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
f00e3eee
Unverified
Commit
f00e3eee
authored
Sep 28, 2016
by
Daniel Dahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated Sample projects with latest pulse and divider property access
parent
aaab03b5
Show whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
60 additions
and
39 deletions
+60
-39
Examples/Programmatic/Bar/Bar/ViewController.swift
+1
-1
Examples/Programmatic/CaptureController/CaptureController/ViewController.swift
+3
-3
Examples/Programmatic/Layer/Layer/ViewController.swift
+9
-9
Examples/Programmatic/MenuController/MenuController/RootViewController.swift
+1
-1
Examples/Programmatic/NavigationController/NavigationController/AppNavigationController.swift
+2
-1
Examples/Programmatic/NavigationController/NavigationController/NextViewController.swift
+5
-2
Examples/Programmatic/NavigationController/NavigationController/RootViewController.swift
+10
-4
Examples/Programmatic/NavigationDrawerController/NavigationDrawerController/RootViewController.swift
+1
-1
Examples/Programmatic/PageTabBarController/PageTabBarController/AppPageTabBarController.swift
+2
-1
Examples/Programmatic/PageTabBarController/PageTabBarController/BlueViewController.swift
+1
-1
Examples/Programmatic/PageTabBarController/PageTabBarController/GreenViewController.swift
+1
-1
Examples/Programmatic/PageTabBarController/PageTabBarController/RedViewController.swift
+1
-1
Examples/Programmatic/PhotoLibraryController/PhotoLibraryController/PhotoLibraryCollectionReusableView.swift
+1
-1
Examples/Programmatic/RemindersController/RemindersController/RemindersItemsCollectionViewCell.swift
+1
-1
Examples/Programmatic/RemindersController/RemindersController/RemindersItemsViewController.swift
+3
-3
Examples/Programmatic/RemindersController/RemindersController/RemindersListCollectionViewCell.swift
+1
-1
Examples/Programmatic/RemindersController/RemindersController/RemindersListViewController.swift
+2
-2
Examples/Programmatic/SnackbarController/SnackbarController/RootViewController.swift
+1
-1
Examples/Programmatic/Switch/Switch.xcodeproj/project.pbxproj
+2
-0
Examples/Programmatic/TabBar/TabBar.xcodeproj/project.pbxproj
+2
-0
Examples/Programmatic/ToolbarController/ToolbarController.xcodeproj/project.pbxproj
+2
-0
Examples/Programmatic/ToolbarController/ToolbarController/RootViewController.swift
+4
-1
Sources/iOS/CollectionReusableView.swift
+1
-1
Sources/iOS/NavigationBar.swift
+2
-1
Sources/iOS/TextField.swift
+1
-1
No files found.
Examples/Programmatic/Bar/Bar/ViewController.swift
View file @
f00e3eee
...
...
@@ -60,7 +60,7 @@ class ViewController: UIViewController {
private
func
prepareMenuButton
()
{
menuButton
=
IconButton
(
image
:
Icon
.
cm
.
menu
,
tintColor
:
Color
.
white
)
menuButton
.
pulse
.
c
olor
=
Color
.
white
menuButton
.
pulse
C
olor
=
Color
.
white
}
private
func
prepareFavoriteButton
()
{
...
...
Examples/Programmatic/CaptureController/CaptureController/ViewController.swift
View file @
f00e3eee
...
...
@@ -84,7 +84,7 @@ public class ViewController: UIViewController {
captureButton
=
FabButton
()
captureButton
.
width
=
72
captureButton
.
height
=
72
captureButton
.
pulse
.
c
olor
=
Color
.
white
captureButton
.
pulse
C
olor
=
Color
.
white
captureButton
.
backgroundColor
=
Color
.
red
.
darken1
.
withAlphaComponent
(
0.3
)
captureButton
.
borderColor
=
Color
.
white
captureButton
.
borderWidthPreset
=
.
border3
...
...
@@ -97,7 +97,7 @@ public class ViewController: UIViewController {
cameraButton
=
IconButton
(
image
:
Icon
.
cm
.
photoCamera
,
tintColor
:
Color
.
white
)
cameraButton
.
width
=
72
cameraButton
.
height
=
72
cameraButton
.
pulse
.
a
nimation
=
.
centerRadialBeyondBounds
cameraButton
.
pulse
A
nimation
=
.
centerRadialBeyondBounds
cameraButton
.
shapePreset
=
.
circle
capture
.
cameraButton
=
cameraButton
...
...
@@ -107,7 +107,7 @@ public class ViewController: UIViewController {
videoButton
=
IconButton
(
image
:
Icon
.
cm
.
videocam
,
tintColor
:
Color
.
white
)
videoButton
.
width
=
72
videoButton
.
height
=
72
videoButton
.
pulse
.
a
nimation
=
.
centerRadialBeyondBounds
videoButton
.
pulse
A
nimation
=
.
centerRadialBeyondBounds
videoButton
.
shapePreset
=
.
circle
capture
.
videoButton
=
videoButton
...
...
Examples/Programmatic/Layer/Layer/ViewController.swift
View file @
f00e3eee
...
...
@@ -33,27 +33,27 @@ import Material
class
ViewController
:
UIViewController
{
/// A reference to the Layer.
private
var
l
ogo
:
Layer
!
private
var
l
ayer
:
Layer
!
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
view
.
backgroundColor
=
Color
.
white
prepareL
ogo
()
prepareL
ayer
()
}
private
func
prepareL
ogo
()
{
private
func
prepareL
ayer
()
{
let
w
=
view
.
width
let
h
=
view
.
height
let
d
:
CGFloat
=
100
l
ogo
=
Layer
(
frame
:
CGRect
(
x
:
(
w
-
d
)
/
2
,
y
:
(
h
-
d
)
/
2
,
width
:
d
,
height
:
d
))
l
ogo
.
depthPreset
=
.
depth3
l
ogo
.
shapePreset
=
.
circle
l
ogo
.
backgroundColor
=
Color
.
white
.
cgColor
l
ogo
.
image
=
UIImage
(
named
:
"CosmicMind"
)
l
ayer
=
Layer
(
frame
:
CGRect
(
x
:
(
w
-
d
)
/
2
,
y
:
(
h
-
d
)
/
2
,
width
:
d
,
height
:
d
))
l
ayer
.
depthPreset
=
.
depth3
l
ayer
.
shapePreset
=
.
circle
l
ayer
.
backgroundColor
=
Color
.
white
.
cgColor
l
ayer
.
image
=
UIImage
(
named
:
"CosmicMind"
)
view
.
layer
.
addSublayer
(
l
ogo
)
view
.
layer
.
addSublayer
(
l
ayer
)
}
}
Examples/Programmatic/MenuController/MenuController/RootViewController.swift
View file @
f00e3eee
...
...
@@ -43,7 +43,7 @@ class RootViewController: UIViewController {
open
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
view
.
backgroundColor
=
Color
.
grey
.
lighten
1
view
.
backgroundColor
=
Color
.
grey
.
lighten
5
prepareAddButton
()
prepareAudioLibraryButton
()
...
...
Examples/Programmatic/NavigationController/NavigationController/AppNavigationController.swift
View file @
f00e3eee
...
...
@@ -34,7 +34,8 @@ import Material
class
AppNavigationController
:
NavigationController
{
open
override
func
prepare
()
{
super
.
prepare
()
statusBarStyle
=
.
default
statusBarStyle
=
.
lightContent
(
navigationBar
as?
NavigationBar
)?
.
backgroundColor
=
Color
.
blue
.
base
}
}
Examples/Programmatic/NavigationController/NavigationController/NextViewController.swift
View file @
f00e3eee
...
...
@@ -34,16 +34,19 @@ import Material
class
NextViewController
:
UIViewController
{
open
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
view
.
backgroundColor
=
Color
.
grey
.
bas
e
view
.
backgroundColor
=
Color
.
whit
e
prepareNavigationItem
()
}
private
func
prepareNavigationItem
()
{
navigationItem
.
title
=
"Title"
navigationItem
.
titleLabel
.
textColor
=
Color
.
white
navigationItem
.
detail
=
"Detail Description"
navigationItem
.
detailLabel
.
textColor
=
Color
.
lightBlue
.
lighten5
navigationItem
.
backButton
.
tintColor
=
Color
.
blue
.
bas
e
navigationItem
.
backButton
.
tintColor
=
Color
.
whit
e
}
}
Examples/Programmatic/NavigationController/NavigationController/RootViewController.swift
View file @
f00e3eee
...
...
@@ -42,7 +42,7 @@ class RootViewController: UIViewController {
open
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
view
.
backgroundColor
=
Color
.
grey
.
lighten
1
view
.
backgroundColor
=
Color
.
grey
.
lighten
5
prepareMenuButton
()
prepareStarButton
()
...
...
@@ -56,20 +56,26 @@ class RootViewController: UIViewController {
}
private
func
prepareMenuButton
()
{
menuButton
=
IconButton
(
image
:
Icon
.
cm
.
menu
,
tintColor
:
Color
.
blue
.
base
)
menuButton
=
IconButton
(
image
:
Icon
.
cm
.
menu
,
tintColor
:
Color
.
white
)
menuButton
.
pulseColor
=
Color
.
white
}
private
func
prepareStarButton
()
{
starButton
=
IconButton
(
image
:
Icon
.
cm
.
star
,
tintColor
:
Color
.
blue
.
base
)
starButton
=
IconButton
(
image
:
Icon
.
cm
.
star
,
tintColor
:
Color
.
white
)
starButton
.
pulseColor
=
Color
.
white
}
private
func
prepareSearchButton
()
{
searchButton
=
IconButton
(
image
:
Icon
.
cm
.
search
,
tintColor
:
Color
.
blue
.
base
)
searchButton
=
IconButton
(
image
:
Icon
.
cm
.
search
,
tintColor
:
Color
.
white
)
searchButton
.
pulseColor
=
Color
.
white
}
private
func
prepareNavigationItem
()
{
navigationItem
.
title
=
"Material"
navigationItem
.
titleLabel
.
textColor
=
Color
.
white
navigationItem
.
detail
=
"Build Beautiful Software"
navigationItem
.
detailLabel
.
textColor
=
Color
.
lightBlue
.
lighten5
navigationItem
.
leftViews
=
[
menuButton
]
navigationItem
.
rightViews
=
[
starButton
,
searchButton
]
...
...
Examples/Programmatic/NavigationDrawerController/NavigationDrawerController/RootViewController.swift
View file @
f00e3eee
...
...
@@ -34,6 +34,6 @@ import Material
class
RootViewController
:
UIViewController
{
open
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
view
.
backgroundColor
=
Color
.
grey
.
lighten1
view
.
backgroundColor
=
Color
.
white
}
}
Examples/Programmatic/PageTabBarController/PageTabBarController/AppPageTabBarController.swift
View file @
f00e3eee
...
...
@@ -41,7 +41,8 @@ class AppPageTabBarController: PageTabBarController {
/// Prepares the pageTabBar.
private
func
preparePageTabBar
()
{
pageTabBar
.
lineColor
=
Color
.
grey
.
darken1
pageTabBar
.
lineColor
=
Color
.
blue
.
base
pageTabBar
.
dividerColor
=
Color
.
blueGrey
.
lighten5
}
}
...
...
Examples/Programmatic/PageTabBarController/PageTabBarController/BlueViewController.swift
View file @
f00e3eee
...
...
@@ -44,7 +44,7 @@ class BlueViewController: UIViewController {
open
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
view
.
backgroundColor
=
Color
.
blue
.
bas
e
view
.
backgroundColor
=
Color
.
whit
e
}
/// Prepares the pageTabBarItem.
...
...
Examples/Programmatic/PageTabBarController/PageTabBarController/GreenViewController.swift
View file @
f00e3eee
...
...
@@ -44,7 +44,7 @@ class GreenViewController: UIViewController {
open
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
view
.
backgroundColor
=
Color
.
green
.
bas
e
view
.
backgroundColor
=
Color
.
whit
e
}
/// Prepares the pageTabBarItem.
...
...
Examples/Programmatic/PageTabBarController/PageTabBarController/RedViewController.swift
View file @
f00e3eee
...
...
@@ -44,7 +44,7 @@ class RedViewController: UIViewController {
open
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
view
.
backgroundColor
=
Color
.
red
.
bas
e
view
.
backgroundColor
=
Color
.
whit
e
}
/// Prepares the pageTabBarItem.
...
...
Examples/Programmatic/PhotoLibraryController/PhotoLibraryController/PhotoLibraryCollectionReusableView.swift
View file @
f00e3eee
...
...
@@ -34,7 +34,7 @@ import Material
class
PhotoLibraryCollectionViewCell
:
CollectionViewCell
{
open
override
func
prepare
()
{
super
.
prepare
()
pulse
.
a
nimation
=
.
backing
pulse
A
nimation
=
.
backing
contentsGravityPreset
=
.
ResizeAspectFill
}
}
Examples/Programmatic/RemindersController/RemindersController/RemindersItemsCollectionViewCell.swift
View file @
f00e3eee
...
...
@@ -53,7 +53,7 @@ class RemindersItemsCollectionViewCell: CollectionViewCell {
/// Prepares the divider.
private
func
prepareDivider
()
{
divider
.
c
olor
=
Color
.
grey
.
lighten3
divider
C
olor
=
Color
.
grey
.
lighten3
}
}
Examples/Programmatic/RemindersController/RemindersController/RemindersItemsViewController.swift
View file @
f00e3eee
...
...
@@ -52,7 +52,7 @@ class RemindersItemsViewController: UIViewController {
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
view
.
backgroundColor
=
Color
.
grey
.
lighten5
view
.
backgroundColor
=
Color
.
white
prepareDateFormatter
()
prepareNavigationItem
()
...
...
@@ -106,14 +106,14 @@ extension RemindersItemsViewController: UICollectionViewDataSource {
/// Returns the number of sections.
func
numberOfSections
(
in
collectionView
:
UICollectionView
)
->
Int
{
return
dataSource
.
items
.
count
return
1
//
dataSource.items.count
}
/// Prepares the cells within the collectionView.
func
collectionView
(
_
collectionView
:
UICollectionView
,
cellForItemAt
indexPath
:
IndexPath
)
->
UICollectionViewCell
{
let
cell
=
collectionView
.
dequeueReusableCell
(
withReuseIdentifier
:
"RemindersItemsCollectionViewCell"
,
for
:
indexPath
)
as!
RemindersItemsCollectionViewCell
let
item
=
dataSource
.
items
[
indexPath
.
section
]
let
item
=
dataSource
.
items
.
last
!
cell
.
textLabel
.
text
=
item
.
title
return
cell
...
...
Examples/Programmatic/RemindersController/RemindersController/RemindersListCollectionViewCell.swift
View file @
f00e3eee
...
...
@@ -61,6 +61,6 @@ class RemindersListCollectionViewCell: CollectionViewCell {
/// Prepares the divider.
private
func
prepareDivider
()
{
divider
.
c
olor
=
Color
.
grey
.
lighten3
divider
C
olor
=
Color
.
grey
.
lighten3
}
}
Examples/Programmatic/RemindersController/RemindersController/RemindersListViewController.swift
View file @
f00e3eee
...
...
@@ -49,7 +49,7 @@ class RemindersListViewController: RemindersController {
open
override
func
prepare
()
{
super
.
prepare
()
view
.
backgroundColor
=
Color
.
grey
.
lighten5
view
.
backgroundColor
=
Color
.
white
prepareNavigationItem
()
prepareCollectionView
()
...
...
@@ -176,7 +176,7 @@ extension RemindersListViewController: UICollectionViewDataSource {
let
items
=
dataSource
.
items
cell
.
titleLabel
.
text
=
list
.
title
cell
.
titleLabel
.
textColor
=
UIColor
(
cgColor
:
list
.
cgColor
)
cell
.
countLabel
.
text
=
"
\(
items
.
count
)
"
cell
.
countLabel
.
text
=
"
1
"
cell
.
countLabel
.
textColor
=
UIColor
(
cgColor
:
list
.
cgColor
)
return
cell
...
...
Examples/Programmatic/SnackbarController/SnackbarController/RootViewController.swift
View file @
f00e3eee
...
...
@@ -37,7 +37,7 @@ class RootViewController: UIViewController {
open
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
view
.
backgroundColor
=
Color
.
grey
.
lighten1
view
.
backgroundColor
=
Color
.
white
prepareUndoButton
()
}
...
...
Examples/Programmatic/Switch/Switch.xcodeproj/project.pbxproj
View file @
f00e3eee
...
...
@@ -262,6 +262,7 @@
isa
=
XCBuildConfiguration
;
buildSettings
=
{
ASSETCATALOG_COMPILER_APPICON_NAME
=
AppIcon
;
DEVELOPMENT_TEAM
=
""
;
INFOPLIST_FILE
=
Switch/Info.plist
;
LD_RUNPATH_SEARCH_PATHS
=
"$(inherited) @executable_path/Frameworks"
;
PRODUCT_BUNDLE_IDENTIFIER
=
io.cosmicmind.Switch
;
...
...
@@ -274,6 +275,7 @@
isa
=
XCBuildConfiguration
;
buildSettings
=
{
ASSETCATALOG_COMPILER_APPICON_NAME
=
AppIcon
;
DEVELOPMENT_TEAM
=
""
;
INFOPLIST_FILE
=
Switch/Info.plist
;
LD_RUNPATH_SEARCH_PATHS
=
"$(inherited) @executable_path/Frameworks"
;
PRODUCT_BUNDLE_IDENTIFIER
=
io.cosmicmind.Switch
;
...
...
Examples/Programmatic/TabBar/TabBar.xcodeproj/project.pbxproj
View file @
f00e3eee
...
...
@@ -262,6 +262,7 @@
isa
=
XCBuildConfiguration
;
buildSettings
=
{
ASSETCATALOG_COMPILER_APPICON_NAME
=
AppIcon
;
DEVELOPMENT_TEAM
=
""
;
INFOPLIST_FILE
=
TabBar/Info.plist
;
LD_RUNPATH_SEARCH_PATHS
=
"$(inherited) @executable_path/Frameworks"
;
PRODUCT_BUNDLE_IDENTIFIER
=
io.cosmicmind.TabBar
;
...
...
@@ -274,6 +275,7 @@
isa
=
XCBuildConfiguration
;
buildSettings
=
{
ASSETCATALOG_COMPILER_APPICON_NAME
=
AppIcon
;
DEVELOPMENT_TEAM
=
""
;
INFOPLIST_FILE
=
TabBar/Info.plist
;
LD_RUNPATH_SEARCH_PATHS
=
"$(inherited) @executable_path/Frameworks"
;
PRODUCT_BUNDLE_IDENTIFIER
=
io.cosmicmind.TabBar
;
...
...
Examples/Programmatic/ToolbarController/ToolbarController.xcodeproj/project.pbxproj
View file @
f00e3eee
...
...
@@ -266,6 +266,7 @@
isa
=
XCBuildConfiguration
;
buildSettings
=
{
ASSETCATALOG_COMPILER_APPICON_NAME
=
AppIcon
;
DEVELOPMENT_TEAM
=
""
;
INFOPLIST_FILE
=
ToolbarController/Info.plist
;
LD_RUNPATH_SEARCH_PATHS
=
"$(inherited) @executable_path/Frameworks"
;
PRODUCT_BUNDLE_IDENTIFIER
=
io.cosmicmind.ToolbarController
;
...
...
@@ -278,6 +279,7 @@
isa
=
XCBuildConfiguration
;
buildSettings
=
{
ASSETCATALOG_COMPILER_APPICON_NAME
=
AppIcon
;
DEVELOPMENT_TEAM
=
""
;
INFOPLIST_FILE
=
ToolbarController/Info.plist
;
LD_RUNPATH_SEARCH_PATHS
=
"$(inherited) @executable_path/Frameworks"
;
PRODUCT_BUNDLE_IDENTIFIER
=
io.cosmicmind.ToolbarController
;
...
...
Examples/Programmatic/ToolbarController/ToolbarController/RootViewController.swift
View file @
f00e3eee
...
...
@@ -39,7 +39,7 @@ class RootViewController: UIViewController {
open
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
view
.
backgroundColor
=
Color
.
grey
.
lighten1
view
.
backgroundColor
=
Color
.
white
}
open
override
func
viewWillAppear
(
_
animated
:
Bool
)
{
...
...
@@ -69,7 +69,10 @@ class RootViewController: UIViewController {
}
tc
.
toolbar
.
title
=
"Marterial"
tc
.
toolbar
.
titleLabel
.
textAlignment
=
.
left
tc
.
toolbar
.
detail
=
"Build Beautiful Software"
tc
.
toolbar
.
detailLabel
.
textAlignment
=
.
left
tc
.
toolbar
.
leftViews
=
[
menuButton
]
tc
.
toolbar
.
rightViews
=
[
starButton
,
searchButton
]
...
...
Sources/iOS/CollectionReusableView.swift
View file @
f00e3eee
...
...
@@ -288,7 +288,7 @@ open class CollectionReusableView: UICollectionReusableView {
*/
open
func
prepare
()
{
contentScaleFactor
=
Device
.
scale
pulse
.
a
nimation
=
.
none
pulse
A
nimation
=
.
none
prepareVisualLayer
()
}
...
...
Sources/iOS/NavigationBar.swift
View file @
f00e3eee
...
...
@@ -324,6 +324,8 @@ open class NavigationBar: UINavigationBar {
when subclassing.
*/
public
func
prepare
()
{
prepareDivider
()
barStyle
=
.
black
isTranslucent
=
false
depthPreset
=
.
depth1
...
...
@@ -335,7 +337,6 @@ open class NavigationBar: UINavigationBar {
shadowImage
=
image
setBackgroundImage
(
image
,
for
:
.
default
)
backgroundColor
=
Color
.
white
prepareDivider
()
}
/**
...
...
Sources/iOS/TextField.swift
View file @
f00e3eee
...
...
@@ -447,7 +447,7 @@ open class TextField: UITextField {
/// The animation for the divider when editing begins.
open
func
dividerEditingDidBeginAnimation
()
{
divider
.
h
eight
=
dividerActiveHeight
divider
H
eight
=
dividerActiveHeight
divider
.
backgroundColor
=
nil
==
dividerActiveColor
?
placeholderActiveColor
.
cgColor
:
dividerActiveColor
!.
cgColor
}
...
...
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