Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
Material
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dmitriy Stepanets
Material
Commits
aaab03b5
Unverified
Commit
aaab03b5
authored
Sep 26, 2016
by
Daniel Dahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated Divider access
parent
3898ce7f
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
73 additions
and
62 deletions
+73
-62
Examples/Programmatic/BottomNavigationController/BottomNavigationController/AppBottomNavigationController.swift
+1
-1
Examples/Programmatic/Card/Card/ViewController.swift
+2
-2
Examples/Programmatic/ImageCard/ImageCard/ViewController.swift
+2
-2
Examples/Programmatic/PhotoLibraryController/PhotoLibraryController/AppToolbarController.swift
+1
-1
Examples/Programmatic/PhotoLibraryController/PhotoLibraryController/PhotoLibraryCollectionViewCell.swift
+1
-1
Examples/Programmatic/PresenterCard/PresenterCard/ViewController.swift
+2
-2
Examples/Programmatic/RemindersController/RemindersController.xcodeproj/project.pbxproj
+2
-9
Examples/Programmatic/RemindersController/RemindersController/AppNavigationController.swift
+1
-1
Examples/Programmatic/TabBar/TabBar/ViewController.swift
+2
-2
Sources/iOS/Bar.swift
+41
-35
Sources/iOS/BottomNavigationController.swift
+1
-1
Sources/iOS/BottomTabBar.swift
+1
-1
Sources/iOS/CollectionViewCell.swift
+7
-1
Sources/iOS/NavigationBar.swift
+7
-1
Sources/iOS/PageTabBarController.swift
+1
-1
Sources/iOS/TabBar.swift
+1
-1
No files found.
Examples/Programmatic/BottomNavigationController/BottomNavigationController/AppBottomNavigationController.swift
View file @
aaab03b5
...
...
@@ -55,6 +55,6 @@ class AppBottomNavigationController: BottomNavigationController {
/// Prepares the tabBar.
private
func
prepareTabBar
()
{
tabBar
.
depthPreset
=
.
none
tabBar
.
divider
.
c
olor
=
Color
.
grey
.
lighten3
tabBar
.
divider
C
olor
=
Color
.
grey
.
lighten3
}
}
Examples/Programmatic/Card/Card/ViewController.swift
View file @
aaab03b5
...
...
@@ -124,8 +124,8 @@ class ViewController: UIViewController {
bottomBar
.
contentEdgeInsetsPreset
=
.
square1
bottomBar
.
cornerRadiusPreset
=
.
cornerRadius1
bottomBar
.
divider
.
c
olor
=
Color
.
grey
.
lighten3
bottomBar
.
divider
.
a
lignment
=
.
top
bottomBar
.
divider
C
olor
=
Color
.
grey
.
lighten3
bottomBar
.
divider
A
lignment
=
.
top
bottomBar
.
contentView
.
grid
.
views
=
[
favoriteButton
,
shareButton
,
starButton
]
}
...
...
Examples/Programmatic/ImageCard/ImageCard/ViewController.swift
View file @
aaab03b5
...
...
@@ -119,8 +119,8 @@ class ViewController: UIViewController {
bottomBar
.
contentEdgeInsetsPreset
=
.
square1
bottomBar
.
cornerRadiusPreset
=
.
cornerRadius1
bottomBar
.
divider
.
c
olor
=
Color
.
grey
.
lighten3
bottomBar
.
divider
.
a
lignment
=
.
top
bottomBar
.
divider
C
olor
=
Color
.
grey
.
lighten3
bottomBar
.
divider
A
lignment
=
.
top
bottomBar
.
contentView
.
grid
.
views
=
[
favoriteButton
,
shareButton
,
starButton
]
}
...
...
Examples/Programmatic/PhotoLibraryController/PhotoLibraryController/AppToolbarController.swift
View file @
aaab03b5
...
...
@@ -42,6 +42,6 @@ class AppToolbarController: ToolbarController {
private
func
prepareToolbar
()
{
toolbar
.
title
=
"Photo Library"
toolbar
.
depthPreset
=
.
none
toolbar
.
divider
.
c
olor
=
Color
.
grey
.
lighten3
toolbar
.
divider
C
olor
=
Color
.
grey
.
lighten3
}
}
Examples/Programmatic/PhotoLibraryController/PhotoLibraryController/PhotoLibraryCollectionViewCell.swift
View file @
aaab03b5
...
...
@@ -50,7 +50,7 @@ class PhotoLibraryCollectionReusableView: CollectionReusableView {
toolbar
.
contentEdgeInsets
.
left
=
16
toolbar
.
contentEdgeInsets
.
right
=
16
toolbar
.
depthPreset
=
.
none
toolbar
.
divider
.
c
olor
=
Color
.
grey
.
lighten3
toolbar
.
divider
C
olor
=
Color
.
grey
.
lighten3
layout
(
toolbar
)
.
edges
()
}
}
Examples/Programmatic/PresenterCard/PresenterCard/ViewController.swift
View file @
aaab03b5
...
...
@@ -127,8 +127,8 @@ class ViewController: UIViewController {
bottomBar
.
contentEdgeInsetsPreset
=
.
square1
bottomBar
.
cornerRadiusPreset
=
.
cornerRadius1
bottomBar
.
divider
.
c
olor
=
Color
.
grey
.
lighten3
bottomBar
.
divider
.
a
lignment
=
.
top
bottomBar
.
divider
C
olor
=
Color
.
grey
.
lighten3
bottomBar
.
divider
A
lignment
=
.
top
bottomBar
.
contentView
.
grid
.
views
=
[
favoriteButton
,
shareButton
,
starButton
]
}
...
...
Examples/Programmatic/RemindersController/RemindersController.xcodeproj/project.pbxproj
View file @
aaab03b5
...
...
@@ -17,8 +17,6 @@
96784FD81D906DCB0061C06C
/* RemindersItemsCollectionView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96784FD71D906DCB0061C06C
/* RemindersItemsCollectionView.swift */
;
};
96784FDA1D906DF60061C06C
/* RemindersItemsCollectionViewCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96784FD91D906DF60061C06C
/* RemindersItemsCollectionViewCell.swift */
;
};
96784FDC1D906E190061C06C
/* AppNavigationController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96784FDB1D906E190061C06C
/* AppNavigationController.swift */
;
};
9690B3F81D99DFA000E7F42A
/* Material.framework in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
9690B3F71D99DFA000E7F42A
/* Material.framework */
;
};
9690B3F91D99DFA000E7F42A
/* Material.framework in Embed Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
9690B3F71D99DFA000E7F42A
/* Material.framework */
;
settings
=
{
ATTRIBUTES
=
(
CodeSignOnCopy
,
RemoveHeadersOnCopy
,
);
};
};
/* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */
...
...
@@ -28,7 +26,6 @@
dstPath
=
""
;
dstSubfolderSpec
=
10
;
files
=
(
9690B3F91D99DFA000E7F42A
/* Material.framework in Embed Frameworks */
,
);
name
=
"Embed Frameworks"
;
runOnlyForDeploymentPostprocessing
=
0
;
...
...
@@ -48,7 +45,6 @@
96784FD71D906DCB0061C06C
/* RemindersItemsCollectionView.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
RemindersItemsCollectionView.swift
;
sourceTree
=
"<group>"
;
};
96784FD91D906DF60061C06C
/* RemindersItemsCollectionViewCell.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
RemindersItemsCollectionViewCell.swift
;
sourceTree
=
"<group>"
;
};
96784FDB1D906E190061C06C
/* AppNavigationController.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
AppNavigationController.swift
;
sourceTree
=
"<group>"
;
};
9690B3F71D99DFA000E7F42A
/* Material.framework */
=
{
isa
=
PBXFileReference
;
explicitFileType
=
wrapper.framework
;
path
=
Material.framework
;
sourceTree
=
BUILT_PRODUCTS_DIR
;
};
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
...
...
@@ -56,7 +52,6 @@
isa
=
PBXFrameworksBuildPhase
;
buildActionMask
=
2147483647
;
files
=
(
9690B3F81D99DFA000E7F42A
/* Material.framework in Frameworks */
,
);
runOnlyForDeploymentPostprocessing
=
0
;
};
...
...
@@ -66,7 +61,6 @@
96784F2B1D901F610061C06C
=
{
isa
=
PBXGroup
;
children
=
(
9690B3F71D99DFA000E7F42A
/* Material.framework */
,
96784F361D901F610061C06C
/* RemindersController */
,
96784F351D901F610061C06C
/* Products */
,
);
...
...
@@ -131,7 +125,6 @@
TargetAttributes
=
{
96784F331D901F610061C06C
=
{
CreatedOnToolsVersion
=
8.0
;
DevelopmentTeam
=
9Z76XCNLGL
;
ProvisioningStyle
=
Automatic
;
};
};
...
...
@@ -293,7 +286,7 @@
isa
=
XCBuildConfiguration
;
buildSettings
=
{
ASSETCATALOG_COMPILER_APPICON_NAME
=
AppIcon
;
DEVELOPMENT_TEAM
=
9Z76XCNLGL
;
DEVELOPMENT_TEAM
=
""
;
INFOPLIST_FILE
=
RemindersController/Info.plist
;
LD_RUNPATH_SEARCH_PATHS
=
"$(inherited) @executable_path/Frameworks"
;
PRODUCT_BUNDLE_IDENTIFIER
=
io.cosmicmind.RemindersController
;
...
...
@@ -306,7 +299,7 @@
isa
=
XCBuildConfiguration
;
buildSettings
=
{
ASSETCATALOG_COMPILER_APPICON_NAME
=
AppIcon
;
DEVELOPMENT_TEAM
=
9Z76XCNLGL
;
DEVELOPMENT_TEAM
=
""
;
INFOPLIST_FILE
=
RemindersController/Info.plist
;
LD_RUNPATH_SEARCH_PATHS
=
"$(inherited) @executable_path/Frameworks"
;
PRODUCT_BUNDLE_IDENTIFIER
=
io.cosmicmind.RemindersController
;
...
...
Examples/Programmatic/RemindersController/RemindersController/AppNavigationController.swift
View file @
aaab03b5
...
...
@@ -46,7 +46,7 @@ class AppNavigationController: NavigationController {
}
v
.
depthPreset
=
.
none
v
.
divider
.
c
olor
=
Color
.
grey
.
lighten3
v
.
divider
C
olor
=
Color
.
grey
.
lighten3
}
}
Examples/Programmatic/TabBar/TabBar/ViewController.swift
View file @
aaab03b5
...
...
@@ -63,8 +63,8 @@ class ViewController: UIViewController {
private
func
prepareTabBar
()
{
tabBar
=
TabBar
()
tabBar
.
divider
.
c
olor
=
Color
.
grey
.
lighten3
tabBar
.
divider
.
a
lignment
=
.
top
tabBar
.
divider
C
olor
=
Color
.
grey
.
lighten3
tabBar
.
divider
A
lignment
=
.
top
tabBar
.
lineColor
=
Color
.
blue
.
base
tabBar
.
lineAlignment
=
.
top
...
...
Sources/iOS/Bar.swift
View file @
aaab03b5
...
...
@@ -37,6 +37,41 @@ public enum ContentViewAlignment: Int {
}
open
class
Bar
:
View
{
/// Divider layer.
internal
private(set)
var
divider
:
Divider
!
/// Divider color.
@IBInspectable
open
var
dividerColor
:
UIColor
?
{
get
{
return
divider
.
color
}
set
(
value
)
{
divider
.
color
=
value
}
}
/// Divider animation.
open
var
dividerAlignment
:
DividerAlignment
{
get
{
return
divider
.
alignment
}
set
(
value
)
{
divider
.
alignment
=
value
}
}
/// Divider height.
@IBInspectable
open
var
dividerHeight
:
CGFloat
{
get
{
return
divider
.
height
}
set
(
value
)
{
divider
.
height
=
value
}
}
/// Should center the contentView.
open
var
contentViewAlignment
=
ContentViewAlignment
.
any
{
didSet
{
...
...
@@ -101,41 +136,6 @@ open class Bar: View {
}
}
/// Divider layer.
internal
lazy
var
divider
:
Divider
=
Divider
(
view
:
self
)
/// Divider color.
@IBInspectable
open
var
dividerColor
:
UIColor
?
{
get
{
return
divider
.
color
}
set
(
value
)
{
divider
.
color
=
value
}
}
/// Divider animation.
open
var
dividerAlignment
:
DividerAlignment
{
get
{
return
divider
.
alignment
}
set
(
value
)
{
divider
.
alignment
=
value
}
}
/// Divider height.
@IBInspectable
open
var
dividerHeight
:
CGFloat
{
get
{
return
divider
.
height
}
set
(
value
)
{
divider
.
height
=
value
}
}
/// ContentView that holds the any desired subviews.
open
private(set)
lazy
var
contentView
=
View
()
...
...
@@ -265,10 +265,16 @@ open class Bar: View {
open
override
func
prepare
()
{
super
.
prepare
()
prepareContentView
()
prepareDivider
()
}
/// Prepares the contentView.
private
func
prepareContentView
()
{
contentView
.
backgroundColor
=
nil
}
/// Prepares the divider.
private
func
prepareDivider
()
{
divider
=
Divider
(
view
:
self
)
}
}
Sources/iOS/BottomNavigationController.swift
View file @
aaab03b5
...
...
@@ -159,7 +159,7 @@ open class BottomNavigationController: UITabBarController, UITabBarControllerDel
/// Prepares the tabBar.
private
func
prepareTabBar
()
{
tabBar
.
depthPreset
=
.
depth1
tabBar
.
divider
.
a
lignment
=
.
top
tabBar
.
divider
A
lignment
=
.
top
let
image
=
UIImage
.
imageWithColor
(
color
:
Color
.
clear
,
size
:
CGSize
(
width
:
1
,
height
:
1
))
tabBar
.
shadowImage
=
image
tabBar
.
backgroundImage
=
image
...
...
Sources/iOS/BottomTabBar.swift
View file @
aaab03b5
...
...
@@ -137,7 +137,7 @@ private var TabBarKey: UInt8 = 0
extension
UITabBar
{
/// TabBarItem reference.
internal
private(set)
var
divider
:
Divider
!
{
internal
private(set)
var
divider
:
Divider
{
get
{
return
AssociatedObject
(
base
:
self
,
key
:
&
TabBarKey
)
{
return
Divider
(
view
:
self
)
...
...
Sources/iOS/CollectionViewCell.swift
View file @
aaab03b5
...
...
@@ -33,7 +33,7 @@ import UIKit
@objc(CollectionViewCell)
open
class
CollectionViewCell
:
UICollectionViewCell
{
/// Divider layer.
internal
private(set)
lazy
var
divider
:
Divider
=
Divider
(
view
:
self
)
internal
private(set)
var
divider
:
Divider
!
/// Divider color.
@IBInspectable
...
...
@@ -331,6 +331,7 @@ open class CollectionViewCell: UICollectionViewCell {
open
func
prepare
()
{
contentScaleFactor
=
Device
.
scale
prepareVisualLayer
()
prepareDivider
()
}
/// Prepares the visualLayer property.
...
...
@@ -345,4 +346,9 @@ open class CollectionViewCell: UICollectionViewCell {
visualLayer
.
frame
=
bounds
visualLayer
.
cornerRadius
=
cornerRadius
}
/// Prepares the divider.
private
func
prepareDivider
()
{
divider
=
Divider
(
view
:
self
)
}
}
Sources/iOS/NavigationBar.swift
View file @
aaab03b5
...
...
@@ -40,7 +40,7 @@ public enum NavigationBarStyle: Int {
open
class
NavigationBar
:
UINavigationBar
{
/// Divider layer.
internal
private(set)
lazy
var
divider
:
Divider
=
Divider
(
view
:
self
)
internal
private(set)
var
divider
:
Divider
!
/// Divider color.
@IBInspectable
...
...
@@ -335,6 +335,7 @@ open class NavigationBar: UINavigationBar {
shadowImage
=
image
setBackgroundImage
(
image
,
for
:
.
default
)
backgroundColor
=
Color
.
white
prepareDivider
()
}
/**
...
...
@@ -356,4 +357,9 @@ open class NavigationBar: UINavigationBar {
}
item
.
titleView
=
UIView
(
frame
:
.
zero
)
}
/// Prepares the divider.
private
func
prepareDivider
()
{
divider
=
Divider
(
view
:
self
)
}
}
Sources/iOS/PageTabBarController.swift
View file @
aaab03b5
...
...
@@ -258,7 +258,7 @@ open class PageTabBarController: RootController {
/// Prepares the pageTabBar.
private
func
preparePageTabBar
()
{
pageTabBar
.
zPosition
=
1000
pageTabBar
.
divider
.
c
olor
=
Color
.
grey
.
lighten3
pageTabBar
.
divider
C
olor
=
Color
.
grey
.
lighten3
view
.
addSubview
(
pageTabBar
)
pageTabBar
.
select
(
at
:
selectedIndex
)
}
...
...
Sources/iOS/TabBar.swift
View file @
aaab03b5
...
...
@@ -225,7 +225,7 @@ open class TabBar: Bar {
/// Prepares the divider.
private
func
prepareDivider
()
{
divider
.
a
lignment
=
.
top
divider
A
lignment
=
.
top
}
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment