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
7a238cd1
Commit
7a238cd1
authored
Sep 29, 2015
by
Daniel Dahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated default naming in MaterialThem
parent
d9e32215
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
146 additions
and
78 deletions
+146
-78
MaterialKit.xcodeproj/project.pbxproj
+26
-0
Source/FabButton.swift
+16
-15
Source/FlatButton.swift
+16
-15
Source/MaterialTheme.swift
+12
-14
Source/NavigationBarView.swift
+19
-19
Source/RaisedButton.swift
+16
-15
Source/SideNavigationViewController.swift
+41
-0
No files found.
MaterialKit.xcodeproj/project.pbxproj
View file @
7a238cd1
...
@@ -45,6 +45,18 @@
...
@@ -45,6 +45,18 @@
9638325A1B88E31A0015F710
/* MaterialKitTests.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
963832581B88E31A0015F710
/* MaterialKitTests.swift */
;
};
9638325A1B88E31A0015F710
/* MaterialKitTests.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
963832581B88E31A0015F710
/* MaterialKitTests.swift */
;
};
964B17B41BBA447F002A9CA0
/* MaterialLayout.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
964B17B31BBA447F002A9CA0
/* MaterialLayout.swift */
;
settings
=
{
ASSET_TAGS
=
();
};
};
964B17B41BBA447F002A9CA0
/* MaterialLayout.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
964B17B31BBA447F002A9CA0
/* MaterialLayout.swift */
;
settings
=
{
ASSET_TAGS
=
();
};
};
964B17B61BBA4BEA002A9CA0
/* MaterialStatusBarStyle.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
964B17B51BBA4BEA002A9CA0
/* MaterialStatusBarStyle.swift */
;
settings
=
{
ASSET_TAGS
=
();
};
};
964B17B61BBA4BEA002A9CA0
/* MaterialStatusBarStyle.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
964B17B51BBA4BEA002A9CA0
/* MaterialStatusBarStyle.swift */
;
settings
=
{
ASSET_TAGS
=
();
};
};
964B17CB1BBB30B0002A9CA0
/* SideNavigationViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
964B17CA1BBB30B0002A9CA0
/* SideNavigationViewController.swift */
;
settings
=
{
ASSET_TAGS
=
();
};
};
964B17CC1BBB31C2002A9CA0
/* MaterialBorder.swift in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
65BDD1691BB7146B006F7F2B
/* MaterialBorder.swift */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
964B17CD1BBB31C2002A9CA0
/* MaterialShape.swift in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
65BDD16B1BB88D1A006F7F2B
/* MaterialShape.swift */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
964B17CE1BBB31C2002A9CA0
/* MaterialSize.swift in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
65BDD1761BB98E31006F7F2B
/* MaterialSize.swift */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
964B17CF1BBB31C2002A9CA0
/* MaterialStatusBarStyle.swift in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
964B17B51BBA4BEA002A9CA0
/* MaterialStatusBarStyle.swift */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
964B17D01BBB31C2002A9CA0
/* MaterialPulseView.swift in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
65BDD16D1BB899F2006F7F2B
/* MaterialPulseView.swift */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
964B17D11BBB31C2002A9CA0
/* SideNavigationViewController.swift in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
964B17CA1BBB30B0002A9CA0
/* SideNavigationViewController.swift */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
964B17D21BBB31C2002A9CA0
/* MaterialLabel.swift in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
65BDD1711BB8CD77006F7F2B
/* MaterialLabel.swift */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
964B17D31BBB31C2002A9CA0
/* RaisedButton.swift in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
65BDD1781BB99C0F006F7F2B
/* RaisedButton.swift */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
964B17D41BBB31C2002A9CA0
/* FabButton.swift in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
65BDD17B1BB99E29006F7F2B
/* FabButton.swift */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
964B17D51BBB31C2002A9CA0
/* MaterialAnimation.swift in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
65BDD1731BB8D443006F7F2B
/* MaterialAnimation.swift */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
964B17D61BBB31C2002A9CA0
/* MaterialLayout.swift in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
964B17B31BBA447F002A9CA0
/* MaterialLayout.swift */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
9A94D0FA1B895EA500F586A5
/* LICENSE in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
963832631B88E5BF0015F710
/* LICENSE */
;
};
9A94D0FA1B895EA500F586A5
/* LICENSE in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
963832631B88E5BF0015F710
/* LICENSE */
;
};
9A94D0FB1B895EA500F586A5
/* Roboto-Regular.ttf in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
9AAC38591B8956E300FE6B2D
/* Roboto-Regular.ttf */
;
};
9A94D0FB1B895EA500F586A5
/* Roboto-Regular.ttf in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
9AAC38591B8956E300FE6B2D
/* Roboto-Regular.ttf */
;
};
9A94D0FC1B895EA500F586A5
/* Roboto-Medium.ttf in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
9AAC38571B8956CF00FE6B2D
/* Roboto-Medium.ttf */
;
};
9A94D0FC1B895EA500F586A5
/* Roboto-Medium.ttf in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
9AAC38571B8956CF00FE6B2D
/* Roboto-Medium.ttf */
;
};
...
@@ -92,6 +104,7 @@
...
@@ -92,6 +104,7 @@
963832631B88E5BF0015F710
/* LICENSE */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
text
;
path
=
LICENSE
;
sourceTree
=
"<group>"
;
};
963832631B88E5BF0015F710
/* LICENSE */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
text
;
path
=
LICENSE
;
sourceTree
=
"<group>"
;
};
964B17B31BBA447F002A9CA0
/* MaterialLayout.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
MaterialLayout.swift
;
sourceTree
=
"<group>"
;
};
964B17B31BBA447F002A9CA0
/* MaterialLayout.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
MaterialLayout.swift
;
sourceTree
=
"<group>"
;
};
964B17B51BBA4BEA002A9CA0
/* MaterialStatusBarStyle.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
MaterialStatusBarStyle.swift
;
sourceTree
=
"<group>"
;
};
964B17B51BBA4BEA002A9CA0
/* MaterialStatusBarStyle.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
MaterialStatusBarStyle.swift
;
sourceTree
=
"<group>"
;
};
964B17CA1BBB30B0002A9CA0
/* SideNavigationViewController.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
SideNavigationViewController.swift
;
sourceTree
=
"<group>"
;
};
9AAC38551B8956C500FE6B2D
/* Roboto-Light.ttf */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file
;
path
=
"Roboto-Light.ttf"
;
sourceTree
=
"<group>"
;
};
9AAC38551B8956C500FE6B2D
/* Roboto-Light.ttf */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file
;
path
=
"Roboto-Light.ttf"
;
sourceTree
=
"<group>"
;
};
9AAC38571B8956CF00FE6B2D
/* Roboto-Medium.ttf */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file
;
path
=
"Roboto-Medium.ttf"
;
sourceTree
=
"<group>"
;
};
9AAC38571B8956CF00FE6B2D
/* Roboto-Medium.ttf */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file
;
path
=
"Roboto-Medium.ttf"
;
sourceTree
=
"<group>"
;
};
9AAC38591B8956E300FE6B2D
/* Roboto-Regular.ttf */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file
;
path
=
"Roboto-Regular.ttf"
;
sourceTree
=
"<group>"
;
};
9AAC38591B8956E300FE6B2D
/* Roboto-Regular.ttf */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file
;
path
=
"Roboto-Regular.ttf"
;
sourceTree
=
"<group>"
;
};
...
@@ -153,6 +166,7 @@
...
@@ -153,6 +166,7 @@
isa
=
PBXGroup
;
isa
=
PBXGroup
;
children
=
(
children
=
(
962F3E521BACA68C0004B8AD
/* NavigationBarView.swift */
,
962F3E521BACA68C0004B8AD
/* NavigationBarView.swift */
,
964B17CA1BBB30B0002A9CA0
/* SideNavigationViewController.swift */
,
);
);
name
=
Navigation
;
name
=
Navigation
;
sourceTree
=
"<group>"
;
sourceTree
=
"<group>"
;
...
@@ -286,6 +300,17 @@
...
@@ -286,6 +300,17 @@
65BDD1661BB7111E006F7F2B
/* MaterialView.swift in Headers */
,
65BDD1661BB7111E006F7F2B
/* MaterialView.swift in Headers */
,
65BDD1671BB7111E006F7F2B
/* MaterialButton.swift in Headers */
,
65BDD1671BB7111E006F7F2B
/* MaterialButton.swift in Headers */
,
65BDD1681BB7111E006F7F2B
/* FlatButton.swift in Headers */
,
65BDD1681BB7111E006F7F2B
/* FlatButton.swift in Headers */
,
964B17CC1BBB31C2002A9CA0
/* MaterialBorder.swift in Headers */
,
964B17CD1BBB31C2002A9CA0
/* MaterialShape.swift in Headers */
,
964B17CE1BBB31C2002A9CA0
/* MaterialSize.swift in Headers */
,
964B17CF1BBB31C2002A9CA0
/* MaterialStatusBarStyle.swift in Headers */
,
964B17D01BBB31C2002A9CA0
/* MaterialPulseView.swift in Headers */
,
964B17D11BBB31C2002A9CA0
/* SideNavigationViewController.swift in Headers */
,
964B17D21BBB31C2002A9CA0
/* MaterialLabel.swift in Headers */
,
964B17D31BBB31C2002A9CA0
/* RaisedButton.swift in Headers */
,
964B17D41BBB31C2002A9CA0
/* FabButton.swift in Headers */
,
964B17D51BBB31C2002A9CA0
/* MaterialAnimation.swift in Headers */
,
964B17D61BBB31C2002A9CA0
/* MaterialLayout.swift in Headers */
,
);
);
runOnlyForDeploymentPostprocessing
=
0
;
runOnlyForDeploymentPostprocessing
=
0
;
};
};
...
@@ -394,6 +419,7 @@
...
@@ -394,6 +419,7 @@
buildActionMask
=
2147483647
;
buildActionMask
=
2147483647
;
files
=
(
files
=
(
65BDD15D1BB70D60006F7F2B
/* MaterialInsets.swift in Sources */
,
65BDD15D1BB70D60006F7F2B
/* MaterialInsets.swift in Sources */
,
964B17CB1BBB30B0002A9CA0
/* SideNavigationViewController.swift in Sources */
,
65BDD1471BB5B916006F7F2B
/* MaterialView.swift in Sources */
,
65BDD1471BB5B916006F7F2B
/* MaterialView.swift in Sources */
,
65BDD16C1BB88D1A006F7F2B
/* MaterialShape.swift in Sources */
,
65BDD16C1BB88D1A006F7F2B
/* MaterialShape.swift in Sources */
,
65BDD1521BB6EE7C006F7F2B
/* RobotoFont.swift in Sources */
,
65BDD1521BB6EE7C006F7F2B
/* RobotoFont.swift in Sources */
,
...
...
Source/FabButton.swift
View file @
7a238cd1
...
@@ -24,22 +24,22 @@ public class FabButton : MaterialButton {
...
@@ -24,22 +24,22 @@ public class FabButton : MaterialButton {
//
//
internal
override
func
prepareView
()
{
internal
override
func
prepareView
()
{
super
.
prepareView
()
super
.
prepareView
()
setTitleColor
(
MaterialTheme
.
button
.
fab
.
titleLabelColorForNormalState
,
forState
:
.
Normal
)
setTitleColor
(
MaterialTheme
.
fabButton
.
titleLabelColorForNormalState
,
forState
:
.
Normal
)
titleLabel
!.
font
=
MaterialTheme
.
button
.
fab
.
titleLabelFont
titleLabel
!.
font
=
MaterialTheme
.
fabButton
.
titleLabelFont
userInteractionEnabled
=
MaterialTheme
.
button
.
fab
.
userInteractionEnabled
userInteractionEnabled
=
MaterialTheme
.
fabButton
.
userInteractionEnabled
backgroundColor
=
MaterialTheme
.
button
.
fab
.
backgroudColor
backgroundColor
=
MaterialTheme
.
fabButton
.
backgroudColor
pulseColorOpacity
=
MaterialTheme
.
button
.
fab
.
pulseColorOpacity
pulseColorOpacity
=
MaterialTheme
.
fabButton
.
pulseColorOpacity
pulseColor
=
MaterialTheme
.
button
.
fab
.
pulseColor
pulseColor
=
MaterialTheme
.
fabButton
.
pulseColor
shadowDepth
=
MaterialTheme
.
button
.
fab
.
shadowDepth
shadowDepth
=
MaterialTheme
.
fabButton
.
shadowDepth
shadowColor
=
MaterialTheme
.
button
.
fab
.
shadowColor
shadowColor
=
MaterialTheme
.
fabButton
.
shadowColor
zPosition
=
MaterialTheme
.
button
.
fab
.
zPosition
zPosition
=
MaterialTheme
.
fabButton
.
zPosition
masksToBounds
=
MaterialTheme
.
button
.
fab
.
masksToBounds
masksToBounds
=
MaterialTheme
.
fabButton
.
masksToBounds
cornerRadius
=
MaterialTheme
.
button
.
fab
.
cornerRadius
cornerRadius
=
MaterialTheme
.
fabButton
.
cornerRadius
borderWidth
=
MaterialTheme
.
button
.
fab
.
borderWidth
borderWidth
=
MaterialTheme
.
fabButton
.
borderWidth
borderColor
=
MaterialTheme
.
button
.
fab
.
bordercolor
borderColor
=
MaterialTheme
.
fabButton
.
bordercolor
contentInsets
=
MaterialTheme
.
button
.
fab
.
contentInsets
contentInsets
=
MaterialTheme
.
fabButton
.
contentInsets
shape
=
MaterialTheme
.
button
.
fab
.
shape
shape
=
MaterialTheme
.
fabButton
.
shape
}
}
}
}
\ No newline at end of file
Source/FlatButton.swift
View file @
7a238cd1
...
@@ -24,22 +24,22 @@ public class FlatButton : MaterialButton {
...
@@ -24,22 +24,22 @@ public class FlatButton : MaterialButton {
//
//
internal
override
func
prepareView
()
{
internal
override
func
prepareView
()
{
super
.
prepareView
()
super
.
prepareView
()
setTitleColor
(
MaterialTheme
.
button
.
flat
.
titleLabelColorForNormalState
,
forState
:
.
Normal
)
setTitleColor
(
MaterialTheme
.
flatButton
.
titleLabelColorForNormalState
,
forState
:
.
Normal
)
titleLabel
!.
font
=
MaterialTheme
.
button
.
flat
.
titleLabelFont
titleLabel
!.
font
=
MaterialTheme
.
flatButton
.
titleLabelFont
userInteractionEnabled
=
MaterialTheme
.
button
.
flat
.
userInteractionEnabled
userInteractionEnabled
=
MaterialTheme
.
flatButton
.
userInteractionEnabled
backgroundColor
=
MaterialTheme
.
button
.
flat
.
backgroudColor
backgroundColor
=
MaterialTheme
.
flatButton
.
backgroudColor
pulseColorOpacity
=
MaterialTheme
.
button
.
flat
.
pulseColorOpacity
pulseColorOpacity
=
MaterialTheme
.
flatButton
.
pulseColorOpacity
pulseColor
=
MaterialTheme
.
button
.
flat
.
pulseColor
pulseColor
=
MaterialTheme
.
flatButton
.
pulseColor
shadowDepth
=
MaterialTheme
.
button
.
flat
.
shadowDepth
shadowDepth
=
MaterialTheme
.
flatButton
.
shadowDepth
shadowColor
=
MaterialTheme
.
button
.
flat
.
shadowColor
shadowColor
=
MaterialTheme
.
flatButton
.
shadowColor
zPosition
=
MaterialTheme
.
button
.
flat
.
zPosition
zPosition
=
MaterialTheme
.
flatButton
.
zPosition
masksToBounds
=
MaterialTheme
.
button
.
flat
.
masksToBounds
masksToBounds
=
MaterialTheme
.
flatButton
.
masksToBounds
cornerRadius
=
MaterialTheme
.
button
.
flat
.
cornerRadius
cornerRadius
=
MaterialTheme
.
flatButton
.
cornerRadius
borderWidth
=
MaterialTheme
.
button
.
flat
.
borderWidth
borderWidth
=
MaterialTheme
.
flatButton
.
borderWidth
borderColor
=
MaterialTheme
.
button
.
flat
.
bordercolor
borderColor
=
MaterialTheme
.
flatButton
.
bordercolor
contentInsets
=
MaterialTheme
.
button
.
flat
.
contentInsets
contentInsets
=
MaterialTheme
.
flatButton
.
contentInsets
shape
=
MaterialTheme
.
button
.
flat
.
shape
shape
=
MaterialTheme
.
flatButton
.
shape
}
}
}
}
\ No newline at end of file
Source/MaterialTheme.swift
View file @
7a238cd1
...
@@ -21,13 +21,11 @@ import UIKit
...
@@ -21,13 +21,11 @@ import UIKit
public
struct
MaterialTheme
{
public
struct
MaterialTheme
{
public
struct
view
{}
public
struct
view
{}
public
struct
pulseView
{}
public
struct
pulseView
{}
public
struct
navigation
{}
public
struct
navigation
BarView
{}
public
struct
label
{}
public
struct
label
{}
public
struct
button
{
public
struct
flatButton
{}
public
struct
flat
{}
public
struct
raisedButton
{}
public
struct
raised
{}
public
struct
fabButton
{}
public
struct
fab
{}
}
}
}
// view
// view
...
@@ -104,8 +102,8 @@ public extension MaterialTheme.pulseView {
...
@@ -104,8 +102,8 @@ public extension MaterialTheme.pulseView {
public
static
var
zPosition
:
CGFloat
=
MaterialTheme
.
view
.
zPosition
public
static
var
zPosition
:
CGFloat
=
MaterialTheme
.
view
.
zPosition
}
}
// navigation
// navigation
BarView
public
extension
MaterialTheme
.
navigation
{
public
extension
MaterialTheme
.
navigation
BarView
{
// frame
// frame
public
static
var
x
:
CGFloat
=
MaterialTheme
.
view
.
x
public
static
var
x
:
CGFloat
=
MaterialTheme
.
view
.
x
public
static
var
y
:
CGFloat
=
MaterialTheme
.
view
.
y
public
static
var
y
:
CGFloat
=
MaterialTheme
.
view
.
y
...
@@ -157,8 +155,8 @@ public extension MaterialTheme.label {
...
@@ -157,8 +155,8 @@ public extension MaterialTheme.label {
public
static
var
font
:
UIFont
=
RobotoFont
.
regularWithSize
(
20
)
public
static
var
font
:
UIFont
=
RobotoFont
.
regularWithSize
(
20
)
}
}
//
button.flat
//
flatButton
public
extension
MaterialTheme
.
button
.
flat
{
public
extension
MaterialTheme
.
flatButton
{
// shadow
// shadow
public
static
var
shadowDepth
:
MaterialDepth
=
.
Depth0
public
static
var
shadowDepth
:
MaterialDepth
=
.
Depth0
public
static
var
shadowColor
:
UIColor
=
MaterialTheme
.
view
.
shadowColor
public
static
var
shadowColor
:
UIColor
=
MaterialTheme
.
view
.
shadowColor
...
@@ -189,8 +187,8 @@ public extension MaterialTheme.button.flat {
...
@@ -189,8 +187,8 @@ public extension MaterialTheme.button.flat {
public
static
var
titleLabelFont
:
UIFont
=
RobotoFont
.
regular
public
static
var
titleLabelFont
:
UIFont
=
RobotoFont
.
regular
}
}
//
button.raised
//
raisedButton
public
extension
MaterialTheme
.
button
.
raised
{
public
extension
MaterialTheme
.
raisedButton
{
// shadow
// shadow
public
static
var
shadowDepth
:
MaterialDepth
=
.
Depth2
public
static
var
shadowDepth
:
MaterialDepth
=
.
Depth2
public
static
var
shadowColor
:
UIColor
=
MaterialTheme
.
view
.
shadowColor
public
static
var
shadowColor
:
UIColor
=
MaterialTheme
.
view
.
shadowColor
...
@@ -222,8 +220,8 @@ public extension MaterialTheme.button.raised {
...
@@ -222,8 +220,8 @@ public extension MaterialTheme.button.raised {
}
}
//
button.fab
//
fabButton
public
extension
MaterialTheme
.
button
.
fab
{
public
extension
MaterialTheme
.
fabButton
{
// shadow
// shadow
public
static
var
shadowDepth
:
MaterialDepth
=
.
Depth2
public
static
var
shadowDepth
:
MaterialDepth
=
.
Depth2
public
static
var
shadowColor
:
UIColor
=
MaterialTheme
.
view
.
shadowColor
public
static
var
shadowColor
:
UIColor
=
MaterialTheme
.
view
.
shadowColor
...
...
Source/NavigationBarView.swift
View file @
7a238cd1
...
@@ -143,14 +143,14 @@ public class NavigationBarView: MaterialView {
...
@@ -143,14 +143,14 @@ public class NavigationBarView: MaterialView {
:name: init
:name: init
*/
*/
public
convenience
init
()
{
public
convenience
init
()
{
self
.
init
(
frame
:
CGRectMake
(
MaterialTheme
.
navigation
.
x
,
MaterialTheme
.
navigation
.
y
,
MaterialTheme
.
navigation
.
width
,
MaterialTheme
.
navigation
.
height
))
self
.
init
(
frame
:
CGRectMake
(
MaterialTheme
.
navigation
BarView
.
x
,
MaterialTheme
.
navigationBarView
.
y
,
MaterialTheme
.
navigationBarView
.
width
,
MaterialTheme
.
navigationBarView
.
height
))
}
}
/**
/**
:name: init
:name: init
*/
*/
public
convenience
init
?(
titleLabel
:
UILabel
?
=
nil
,
leftButtons
:
Array
<
MaterialButton
>
?
=
nil
,
rightButtons
:
Array
<
MaterialButton
>
?
=
nil
)
{
public
convenience
init
?(
titleLabel
:
UILabel
?
=
nil
,
leftButtons
:
Array
<
MaterialButton
>
?
=
nil
,
rightButtons
:
Array
<
MaterialButton
>
?
=
nil
)
{
self
.
init
(
frame
:
CGRectMake
(
MaterialTheme
.
navigation
.
x
,
MaterialTheme
.
navigation
.
y
,
MaterialTheme
.
navigation
.
width
,
MaterialTheme
.
navigation
.
height
))
self
.
init
(
frame
:
CGRectMake
(
MaterialTheme
.
navigation
BarView
.
x
,
MaterialTheme
.
navigationBarView
.
y
,
MaterialTheme
.
navigationBarView
.
width
,
MaterialTheme
.
navigationBarView
.
height
))
self
.
prepareProperties
(
titleLabel
,
leftButtons
:
leftButtons
,
rightButtons
:
rightButtons
)
self
.
prepareProperties
(
titleLabel
,
leftButtons
:
leftButtons
,
rightButtons
:
rightButtons
)
}
}
...
@@ -222,23 +222,23 @@ public class NavigationBarView: MaterialView {
...
@@ -222,23 +222,23 @@ public class NavigationBarView: MaterialView {
//
//
internal
override
func
prepareView
()
{
internal
override
func
prepareView
()
{
super
.
prepareView
()
super
.
prepareView
()
userInteractionEnabled
=
MaterialTheme
.
navigation
.
userInteractionEnabled
userInteractionEnabled
=
MaterialTheme
.
navigation
BarView
.
userInteractionEnabled
backgroundColor
=
MaterialTheme
.
navigation
.
backgroudColor
backgroundColor
=
MaterialTheme
.
navigation
BarView
.
backgroudColor
statusBarStyle
=
MaterialTheme
.
navigation
.
statusBarStyle
statusBarStyle
=
MaterialTheme
.
navigation
BarView
.
statusBarStyle
titleInsetsRef
=
MaterialTheme
.
navigation
.
titleInsetsRef
titleInsetsRef
=
MaterialTheme
.
navigation
BarView
.
titleInsetsRef
leftButtonsInsetsRef
=
MaterialTheme
.
navigation
.
leftButtonsInsetsRef
leftButtonsInsetsRef
=
MaterialTheme
.
navigation
BarView
.
leftButtonsInsetsRef
rightButtonsInsetsRef
=
MaterialTheme
.
navigation
.
rightButtonsInsetsRef
rightButtonsInsetsRef
=
MaterialTheme
.
navigation
BarView
.
rightButtonsInsetsRef
contentsRect
=
MaterialTheme
.
navigation
.
contentsRect
contentsRect
=
MaterialTheme
.
navigation
BarView
.
contentsRect
contentsCenter
=
MaterialTheme
.
navigation
.
contentsCenter
contentsCenter
=
MaterialTheme
.
navigation
BarView
.
contentsCenter
contentsScale
=
MaterialTheme
.
navigation
.
contentsScale
contentsScale
=
MaterialTheme
.
navigation
BarView
.
contentsScale
contentsGravity
=
MaterialTheme
.
navigation
.
contentsGravity
contentsGravity
=
MaterialTheme
.
navigation
BarView
.
contentsGravity
shadowDepth
=
MaterialTheme
.
navigation
.
shadowDepth
shadowDepth
=
MaterialTheme
.
navigation
BarView
.
shadowDepth
shadowColor
=
MaterialTheme
.
navigation
.
shadowColor
shadowColor
=
MaterialTheme
.
navigation
BarView
.
shadowColor
zPosition
=
MaterialTheme
.
navigation
.
zPosition
zPosition
=
MaterialTheme
.
navigation
BarView
.
zPosition
masksToBounds
=
MaterialTheme
.
navigation
.
masksToBounds
masksToBounds
=
MaterialTheme
.
navigation
BarView
.
masksToBounds
cornerRadius
=
MaterialTheme
.
navigation
.
cornerRadius
cornerRadius
=
MaterialTheme
.
navigation
BarView
.
cornerRadius
borderWidth
=
MaterialTheme
.
navigation
.
borderWidth
borderWidth
=
MaterialTheme
.
navigation
BarView
.
borderWidth
borderColor
=
MaterialTheme
.
navigation
.
bordercolor
borderColor
=
MaterialTheme
.
navigation
BarView
.
bordercolor
}
}
}
}
Source/RaisedButton.swift
View file @
7a238cd1
...
@@ -24,22 +24,22 @@ public class RaisedButton : MaterialButton {
...
@@ -24,22 +24,22 @@ public class RaisedButton : MaterialButton {
//
//
internal
override
func
prepareView
()
{
internal
override
func
prepareView
()
{
super
.
prepareView
()
super
.
prepareView
()
setTitleColor
(
MaterialTheme
.
button
.
raised
.
titleLabelColorForNormalState
,
forState
:
.
Normal
)
setTitleColor
(
MaterialTheme
.
raisedButton
.
titleLabelColorForNormalState
,
forState
:
.
Normal
)
titleLabel
!.
font
=
MaterialTheme
.
button
.
raised
.
titleLabelFont
titleLabel
!.
font
=
MaterialTheme
.
raisedButton
.
titleLabelFont
userInteractionEnabled
=
MaterialTheme
.
button
.
raised
.
userInteractionEnabled
userInteractionEnabled
=
MaterialTheme
.
raisedButton
.
userInteractionEnabled
backgroundColor
=
MaterialTheme
.
button
.
raised
.
backgroudColor
backgroundColor
=
MaterialTheme
.
raisedButton
.
backgroudColor
pulseColorOpacity
=
MaterialTheme
.
button
.
raised
.
pulseColorOpacity
pulseColorOpacity
=
MaterialTheme
.
raisedButton
.
pulseColorOpacity
pulseColor
=
MaterialTheme
.
button
.
raised
.
pulseColor
pulseColor
=
MaterialTheme
.
raisedButton
.
pulseColor
shadowDepth
=
MaterialTheme
.
button
.
raised
.
shadowDepth
shadowDepth
=
MaterialTheme
.
raisedButton
.
shadowDepth
shadowColor
=
MaterialTheme
.
button
.
raised
.
shadowColor
shadowColor
=
MaterialTheme
.
raisedButton
.
shadowColor
zPosition
=
MaterialTheme
.
button
.
raised
.
zPosition
zPosition
=
MaterialTheme
.
raisedButton
.
zPosition
masksToBounds
=
MaterialTheme
.
button
.
raised
.
masksToBounds
masksToBounds
=
MaterialTheme
.
raisedButton
.
masksToBounds
cornerRadius
=
MaterialTheme
.
button
.
raised
.
cornerRadius
cornerRadius
=
MaterialTheme
.
raisedButton
.
cornerRadius
borderWidth
=
MaterialTheme
.
button
.
raised
.
borderWidth
borderWidth
=
MaterialTheme
.
raisedButton
.
borderWidth
borderColor
=
MaterialTheme
.
button
.
raised
.
bordercolor
borderColor
=
MaterialTheme
.
raisedButton
.
bordercolor
contentInsets
=
MaterialTheme
.
button
.
raised
.
contentInsets
contentInsets
=
MaterialTheme
.
raisedButton
.
contentInsets
shape
=
MaterialTheme
.
button
.
raised
.
shape
shape
=
MaterialTheme
.
raisedButton
.
shape
}
}
}
}
\ No newline at end of file
Source/SideNavigationViewController.swift
0 → 100644
View file @
7a238cd1
//
// Copyright (C) 2015 GraphKit, Inc. <http://graphkit.io> and other GraphKit contributors.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published
// by the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program located at the root of the software package
// in a file called LICENSE. If not, see <http://www.gnu.org/licenses/>.
//
import
UIKit
public
extension
UIViewController
{
/**
:name: sideNavigationViewController
*/
public
var
sideNavigationViewController
:
SideNavigationViewController
?
{
var
viewController
:
UIViewController
?
=
self
while
nil
!=
viewController
{
if
viewController
is
SideNavigationViewController
{
return
viewController
as?
SideNavigationViewController
}
viewController
=
viewController
?
.
parentViewController
}
return
nil
}
}
@objc(SideNavigationViewController)
public
class
SideNavigationViewController
:
UIViewController
,
UIGestureRecognizerDelegate
{
}
\ No newline at end of file
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