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 {
...
@@ -55,6 +55,6 @@ class AppBottomNavigationController: BottomNavigationController {
/// Prepares the tabBar.
/// Prepares the tabBar.
private
func
prepareTabBar
()
{
private
func
prepareTabBar
()
{
tabBar
.
depthPreset
=
.
none
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 {
...
@@ -124,8 +124,8 @@ class ViewController: UIViewController {
bottomBar
.
contentEdgeInsetsPreset
=
.
square1
bottomBar
.
contentEdgeInsetsPreset
=
.
square1
bottomBar
.
cornerRadiusPreset
=
.
cornerRadius1
bottomBar
.
cornerRadiusPreset
=
.
cornerRadius1
bottomBar
.
divider
.
c
olor
=
Color
.
grey
.
lighten3
bottomBar
.
divider
C
olor
=
Color
.
grey
.
lighten3
bottomBar
.
divider
.
a
lignment
=
.
top
bottomBar
.
divider
A
lignment
=
.
top
bottomBar
.
contentView
.
grid
.
views
=
[
favoriteButton
,
shareButton
,
starButton
]
bottomBar
.
contentView
.
grid
.
views
=
[
favoriteButton
,
shareButton
,
starButton
]
}
}
...
...
Examples/Programmatic/ImageCard/ImageCard/ViewController.swift
View file @
aaab03b5
...
@@ -119,8 +119,8 @@ class ViewController: UIViewController {
...
@@ -119,8 +119,8 @@ class ViewController: UIViewController {
bottomBar
.
contentEdgeInsetsPreset
=
.
square1
bottomBar
.
contentEdgeInsetsPreset
=
.
square1
bottomBar
.
cornerRadiusPreset
=
.
cornerRadius1
bottomBar
.
cornerRadiusPreset
=
.
cornerRadius1
bottomBar
.
divider
.
c
olor
=
Color
.
grey
.
lighten3
bottomBar
.
divider
C
olor
=
Color
.
grey
.
lighten3
bottomBar
.
divider
.
a
lignment
=
.
top
bottomBar
.
divider
A
lignment
=
.
top
bottomBar
.
contentView
.
grid
.
views
=
[
favoriteButton
,
shareButton
,
starButton
]
bottomBar
.
contentView
.
grid
.
views
=
[
favoriteButton
,
shareButton
,
starButton
]
}
}
...
...
Examples/Programmatic/PhotoLibraryController/PhotoLibraryController/AppToolbarController.swift
View file @
aaab03b5
...
@@ -42,6 +42,6 @@ class AppToolbarController: ToolbarController {
...
@@ -42,6 +42,6 @@ class AppToolbarController: ToolbarController {
private
func
prepareToolbar
()
{
private
func
prepareToolbar
()
{
toolbar
.
title
=
"Photo Library"
toolbar
.
title
=
"Photo Library"
toolbar
.
depthPreset
=
.
none
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 {
...
@@ -50,7 +50,7 @@ class PhotoLibraryCollectionReusableView: CollectionReusableView {
toolbar
.
contentEdgeInsets
.
left
=
16
toolbar
.
contentEdgeInsets
.
left
=
16
toolbar
.
contentEdgeInsets
.
right
=
16
toolbar
.
contentEdgeInsets
.
right
=
16
toolbar
.
depthPreset
=
.
none
toolbar
.
depthPreset
=
.
none
toolbar
.
divider
.
c
olor
=
Color
.
grey
.
lighten3
toolbar
.
divider
C
olor
=
Color
.
grey
.
lighten3
layout
(
toolbar
)
.
edges
()
layout
(
toolbar
)
.
edges
()
}
}
}
}
Examples/Programmatic/PresenterCard/PresenterCard/ViewController.swift
View file @
aaab03b5
...
@@ -127,8 +127,8 @@ class ViewController: UIViewController {
...
@@ -127,8 +127,8 @@ class ViewController: UIViewController {
bottomBar
.
contentEdgeInsetsPreset
=
.
square1
bottomBar
.
contentEdgeInsetsPreset
=
.
square1
bottomBar
.
cornerRadiusPreset
=
.
cornerRadius1
bottomBar
.
cornerRadiusPreset
=
.
cornerRadius1
bottomBar
.
divider
.
c
olor
=
Color
.
grey
.
lighten3
bottomBar
.
divider
C
olor
=
Color
.
grey
.
lighten3
bottomBar
.
divider
.
a
lignment
=
.
top
bottomBar
.
divider
A
lignment
=
.
top
bottomBar
.
contentView
.
grid
.
views
=
[
favoriteButton
,
shareButton
,
starButton
]
bottomBar
.
contentView
.
grid
.
views
=
[
favoriteButton
,
shareButton
,
starButton
]
}
}
...
...
Examples/Programmatic/RemindersController/RemindersController.xcodeproj/project.pbxproj
View file @
aaab03b5
...
@@ -17,8 +17,6 @@
...
@@ -17,8 +17,6 @@
96784FD81D906DCB0061C06C
/* RemindersItemsCollectionView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96784FD71D906DCB0061C06C
/* RemindersItemsCollectionView.swift */
;
};
96784FD81D906DCB0061C06C
/* RemindersItemsCollectionView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96784FD71D906DCB0061C06C
/* RemindersItemsCollectionView.swift */
;
};
96784FDA1D906DF60061C06C
/* RemindersItemsCollectionViewCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96784FD91D906DF60061C06C
/* RemindersItemsCollectionViewCell.swift */
;
};
96784FDA1D906DF60061C06C
/* RemindersItemsCollectionViewCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96784FD91D906DF60061C06C
/* RemindersItemsCollectionViewCell.swift */
;
};
96784FDC1D906E190061C06C
/* AppNavigationController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96784FDB1D906E190061C06C
/* AppNavigationController.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 */
/* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */
/* Begin PBXCopyFilesBuildPhase section */
...
@@ -28,7 +26,6 @@
...
@@ -28,7 +26,6 @@
dstPath
=
""
;
dstPath
=
""
;
dstSubfolderSpec
=
10
;
dstSubfolderSpec
=
10
;
files
=
(
files
=
(
9690B3F91D99DFA000E7F42A
/* Material.framework in Embed Frameworks */
,
);
);
name
=
"Embed Frameworks"
;
name
=
"Embed Frameworks"
;
runOnlyForDeploymentPostprocessing
=
0
;
runOnlyForDeploymentPostprocessing
=
0
;
...
@@ -48,7 +45,6 @@
...
@@ -48,7 +45,6 @@
96784FD71D906DCB0061C06C
/* RemindersItemsCollectionView.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
RemindersItemsCollectionView.swift
;
sourceTree
=
"<group>"
;
};
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>"
;
};
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>"
;
};
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 */
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
/* Begin PBXFrameworksBuildPhase section */
...
@@ -56,7 +52,6 @@
...
@@ -56,7 +52,6 @@
isa
=
PBXFrameworksBuildPhase
;
isa
=
PBXFrameworksBuildPhase
;
buildActionMask
=
2147483647
;
buildActionMask
=
2147483647
;
files
=
(
files
=
(
9690B3F81D99DFA000E7F42A
/* Material.framework in Frameworks */
,
);
);
runOnlyForDeploymentPostprocessing
=
0
;
runOnlyForDeploymentPostprocessing
=
0
;
};
};
...
@@ -66,7 +61,6 @@
...
@@ -66,7 +61,6 @@
96784F2B1D901F610061C06C
=
{
96784F2B1D901F610061C06C
=
{
isa
=
PBXGroup
;
isa
=
PBXGroup
;
children
=
(
children
=
(
9690B3F71D99DFA000E7F42A
/* Material.framework */
,
96784F361D901F610061C06C
/* RemindersController */
,
96784F361D901F610061C06C
/* RemindersController */
,
96784F351D901F610061C06C
/* Products */
,
96784F351D901F610061C06C
/* Products */
,
);
);
...
@@ -131,7 +125,6 @@
...
@@ -131,7 +125,6 @@
TargetAttributes
=
{
TargetAttributes
=
{
96784F331D901F610061C06C
=
{
96784F331D901F610061C06C
=
{
CreatedOnToolsVersion
=
8.0
;
CreatedOnToolsVersion
=
8.0
;
DevelopmentTeam
=
9Z76XCNLGL
;
ProvisioningStyle
=
Automatic
;
ProvisioningStyle
=
Automatic
;
};
};
};
};
...
@@ -293,7 +286,7 @@
...
@@ -293,7 +286,7 @@
isa
=
XCBuildConfiguration
;
isa
=
XCBuildConfiguration
;
buildSettings
=
{
buildSettings
=
{
ASSETCATALOG_COMPILER_APPICON_NAME
=
AppIcon
;
ASSETCATALOG_COMPILER_APPICON_NAME
=
AppIcon
;
DEVELOPMENT_TEAM
=
9Z76XCNLGL
;
DEVELOPMENT_TEAM
=
""
;
INFOPLIST_FILE
=
RemindersController/Info.plist
;
INFOPLIST_FILE
=
RemindersController/Info.plist
;
LD_RUNPATH_SEARCH_PATHS
=
"$(inherited) @executable_path/Frameworks"
;
LD_RUNPATH_SEARCH_PATHS
=
"$(inherited) @executable_path/Frameworks"
;
PRODUCT_BUNDLE_IDENTIFIER
=
io.cosmicmind.RemindersController
;
PRODUCT_BUNDLE_IDENTIFIER
=
io.cosmicmind.RemindersController
;
...
@@ -306,7 +299,7 @@
...
@@ -306,7 +299,7 @@
isa
=
XCBuildConfiguration
;
isa
=
XCBuildConfiguration
;
buildSettings
=
{
buildSettings
=
{
ASSETCATALOG_COMPILER_APPICON_NAME
=
AppIcon
;
ASSETCATALOG_COMPILER_APPICON_NAME
=
AppIcon
;
DEVELOPMENT_TEAM
=
9Z76XCNLGL
;
DEVELOPMENT_TEAM
=
""
;
INFOPLIST_FILE
=
RemindersController/Info.plist
;
INFOPLIST_FILE
=
RemindersController/Info.plist
;
LD_RUNPATH_SEARCH_PATHS
=
"$(inherited) @executable_path/Frameworks"
;
LD_RUNPATH_SEARCH_PATHS
=
"$(inherited) @executable_path/Frameworks"
;
PRODUCT_BUNDLE_IDENTIFIER
=
io.cosmicmind.RemindersController
;
PRODUCT_BUNDLE_IDENTIFIER
=
io.cosmicmind.RemindersController
;
...
...
Examples/Programmatic/RemindersController/RemindersController/AppNavigationController.swift
View file @
aaab03b5
...
@@ -46,7 +46,7 @@ class AppNavigationController: NavigationController {
...
@@ -46,7 +46,7 @@ class AppNavigationController: NavigationController {
}
}
v
.
depthPreset
=
.
none
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 {
...
@@ -63,8 +63,8 @@ class ViewController: UIViewController {
private
func
prepareTabBar
()
{
private
func
prepareTabBar
()
{
tabBar
=
TabBar
()
tabBar
=
TabBar
()
tabBar
.
divider
.
c
olor
=
Color
.
grey
.
lighten3
tabBar
.
divider
C
olor
=
Color
.
grey
.
lighten3
tabBar
.
divider
.
a
lignment
=
.
top
tabBar
.
divider
A
lignment
=
.
top
tabBar
.
lineColor
=
Color
.
blue
.
base
tabBar
.
lineColor
=
Color
.
blue
.
base
tabBar
.
lineAlignment
=
.
top
tabBar
.
lineAlignment
=
.
top
...
...
Sources/iOS/Bar.swift
View file @
aaab03b5
...
@@ -37,6 +37,41 @@ public enum ContentViewAlignment: Int {
...
@@ -37,6 +37,41 @@ public enum ContentViewAlignment: Int {
}
}
open
class
Bar
:
View
{
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.
/// Should center the contentView.
open
var
contentViewAlignment
=
ContentViewAlignment
.
any
{
open
var
contentViewAlignment
=
ContentViewAlignment
.
any
{
didSet
{
didSet
{
...
@@ -101,41 +136,6 @@ open class Bar: View {
...
@@ -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.
/// ContentView that holds the any desired subviews.
open
private(set)
lazy
var
contentView
=
View
()
open
private(set)
lazy
var
contentView
=
View
()
...
@@ -265,10 +265,16 @@ open class Bar: View {
...
@@ -265,10 +265,16 @@ open class Bar: View {
open
override
func
prepare
()
{
open
override
func
prepare
()
{
super
.
prepare
()
super
.
prepare
()
prepareContentView
()
prepareContentView
()
prepareDivider
()
}
}
/// Prepares the contentView.
/// Prepares the contentView.
private
func
prepareContentView
()
{
private
func
prepareContentView
()
{
contentView
.
backgroundColor
=
nil
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
...
@@ -159,7 +159,7 @@ open class BottomNavigationController: UITabBarController, UITabBarControllerDel
/// Prepares the tabBar.
/// Prepares the tabBar.
private
func
prepareTabBar
()
{
private
func
prepareTabBar
()
{
tabBar
.
depthPreset
=
.
depth1
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
))
let
image
=
UIImage
.
imageWithColor
(
color
:
Color
.
clear
,
size
:
CGSize
(
width
:
1
,
height
:
1
))
tabBar
.
shadowImage
=
image
tabBar
.
shadowImage
=
image
tabBar
.
backgroundImage
=
image
tabBar
.
backgroundImage
=
image
...
...
Sources/iOS/BottomTabBar.swift
View file @
aaab03b5
...
@@ -137,7 +137,7 @@ private var TabBarKey: UInt8 = 0
...
@@ -137,7 +137,7 @@ private var TabBarKey: UInt8 = 0
extension
UITabBar
{
extension
UITabBar
{
/// TabBarItem reference.
/// TabBarItem reference.
internal
private(set)
var
divider
:
Divider
!
{
internal
private(set)
var
divider
:
Divider
{
get
{
get
{
return
AssociatedObject
(
base
:
self
,
key
:
&
TabBarKey
)
{
return
AssociatedObject
(
base
:
self
,
key
:
&
TabBarKey
)
{
return
Divider
(
view
:
self
)
return
Divider
(
view
:
self
)
...
...
Sources/iOS/CollectionViewCell.swift
View file @
aaab03b5
...
@@ -33,7 +33,7 @@ import UIKit
...
@@ -33,7 +33,7 @@ import UIKit
@objc(CollectionViewCell)
@objc(CollectionViewCell)
open
class
CollectionViewCell
:
UICollectionViewCell
{
open
class
CollectionViewCell
:
UICollectionViewCell
{
/// Divider layer.
/// Divider layer.
internal
private(set)
lazy
var
divider
:
Divider
=
Divider
(
view
:
self
)
internal
private(set)
var
divider
:
Divider
!
/// Divider color.
/// Divider color.
@IBInspectable
@IBInspectable
...
@@ -331,6 +331,7 @@ open class CollectionViewCell: UICollectionViewCell {
...
@@ -331,6 +331,7 @@ open class CollectionViewCell: UICollectionViewCell {
open
func
prepare
()
{
open
func
prepare
()
{
contentScaleFactor
=
Device
.
scale
contentScaleFactor
=
Device
.
scale
prepareVisualLayer
()
prepareVisualLayer
()
prepareDivider
()
}
}
/// Prepares the visualLayer property.
/// Prepares the visualLayer property.
...
@@ -345,4 +346,9 @@ open class CollectionViewCell: UICollectionViewCell {
...
@@ -345,4 +346,9 @@ open class CollectionViewCell: UICollectionViewCell {
visualLayer
.
frame
=
bounds
visualLayer
.
frame
=
bounds
visualLayer
.
cornerRadius
=
cornerRadius
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 {
...
@@ -40,7 +40,7 @@ public enum NavigationBarStyle: Int {
open
class
NavigationBar
:
UINavigationBar
{
open
class
NavigationBar
:
UINavigationBar
{
/// Divider layer.
/// Divider layer.
internal
private(set)
lazy
var
divider
:
Divider
=
Divider
(
view
:
self
)
internal
private(set)
var
divider
:
Divider
!
/// Divider color.
/// Divider color.
@IBInspectable
@IBInspectable
...
@@ -335,6 +335,7 @@ open class NavigationBar: UINavigationBar {
...
@@ -335,6 +335,7 @@ open class NavigationBar: UINavigationBar {
shadowImage
=
image
shadowImage
=
image
setBackgroundImage
(
image
,
for
:
.
default
)
setBackgroundImage
(
image
,
for
:
.
default
)
backgroundColor
=
Color
.
white
backgroundColor
=
Color
.
white
prepareDivider
()
}
}
/**
/**
...
@@ -356,4 +357,9 @@ open class NavigationBar: UINavigationBar {
...
@@ -356,4 +357,9 @@ open class NavigationBar: UINavigationBar {
}
}
item
.
titleView
=
UIView
(
frame
:
.
zero
)
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 {
...
@@ -258,7 +258,7 @@ open class PageTabBarController: RootController {
/// Prepares the pageTabBar.
/// Prepares the pageTabBar.
private
func
preparePageTabBar
()
{
private
func
preparePageTabBar
()
{
pageTabBar
.
zPosition
=
1000
pageTabBar
.
zPosition
=
1000
pageTabBar
.
divider
.
c
olor
=
Color
.
grey
.
lighten3
pageTabBar
.
divider
C
olor
=
Color
.
grey
.
lighten3
view
.
addSubview
(
pageTabBar
)
view
.
addSubview
(
pageTabBar
)
pageTabBar
.
select
(
at
:
selectedIndex
)
pageTabBar
.
select
(
at
:
selectedIndex
)
}
}
...
...
Sources/iOS/TabBar.swift
View file @
aaab03b5
...
@@ -225,7 +225,7 @@ open class TabBar: Bar {
...
@@ -225,7 +225,7 @@ open class TabBar: Bar {
/// Prepares the divider.
/// Prepares the divider.
private
func
prepareDivider
()
{
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