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
f77ba634
Commit
f77ba634
authored
Sep 29, 2015
by
Daniel Dahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update prior to adding buttons to BasicCardView
parent
11f70164
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
44 deletions
+43
-44
Source/MaterialButton.swift
+1
-1
Source/MaterialTheme.swift
+42
-43
No files found.
Source/MaterialButton.swift
View file @
f77ba634
...
...
@@ -259,7 +259,7 @@ public class MaterialButton : UIButton {
:name: init
*/
public
convenience
init
()
{
self
.
init
(
frame
:
CGRect
Make
(
MaterialTheme
.
view
.
x
,
MaterialTheme
.
view
.
y
,
MaterialTheme
.
view
.
width
,
MaterialTheme
.
view
.
height
)
)
self
.
init
(
frame
:
CGRect
Zero
)
}
/**
...
...
Source/MaterialTheme.swift
View file @
f77ba634
...
...
@@ -62,16 +62,16 @@ public extension MaterialTheme.view {
// pulseView
public
extension
MaterialTheme
.
pulseView
{
// shadow
public
static
var
shadowDepth
:
MaterialDepth
=
MaterialTheme
.
view
.
shadowDepth
public
static
var
shadowColor
:
UIColor
=
Material
Theme
.
view
.
shadowColor
public
static
var
shadowDepth
:
MaterialDepth
=
.
Depth0
public
static
var
shadowColor
:
UIColor
=
Material
Color
.
black
// shape
public
static
var
masksToBounds
:
Bool
=
true
public
static
var
cornerRadius
:
MaterialRadius
=
MaterialTheme
.
view
.
cornerRadius
public
static
var
cornerRadius
:
MaterialRadius
=
.
Radius0
// border
public
static
var
borderWidth
:
MaterialBorder
=
MaterialTheme
.
view
.
borderWidth
public
static
var
bordercolor
:
UIColor
=
Material
Theme
.
view
.
bordercolor
public
static
var
borderWidth
:
MaterialBorder
=
.
Border0
public
static
var
bordercolor
:
UIColor
=
Material
Color
.
black
// color
public
static
var
backgroudColor
:
UIColor
=
MaterialColor
.
clear
...
...
@@ -79,23 +79,23 @@ public extension MaterialTheme.pulseView {
public
static
var
pulseColorOpacity
:
CGFloat
=
0.25
// interaction
public
static
var
userInteractionEnabled
:
Bool
=
MaterialTheme
.
view
.
userInteractionEnabled
public
static
var
userInteractionEnabled
:
Bool
=
true
// image
public
static
var
contentsRect
:
CGRect
=
MaterialTheme
.
view
.
contentsRect
public
static
var
contentsCenter
:
CGRect
=
MaterialTheme
.
view
.
contentsCenter
public
static
var
contentsScale
:
CGFloat
=
MaterialTheme
.
view
.
contentsS
cale
public
static
var
contentsGravity
:
MaterialGravity
=
MaterialTheme
.
view
.
contentsGravity
public
static
var
contentsRect
:
CGRect
=
CGRectMake
(
0
,
0
,
1
,
1
)
public
static
var
contentsCenter
:
CGRect
=
CGRectMake
(
0
,
0
,
1
,
1
)
public
static
var
contentsScale
:
CGFloat
=
UIScreen
.
mainScreen
()
.
s
cale
public
static
var
contentsGravity
:
MaterialGravity
=
.
ResizeAspectFill
// position
public
static
var
zPosition
:
CGFloat
=
MaterialTheme
.
view
.
zPosition
public
static
var
zPosition
:
CGFloat
=
0
}
// basicCardView
public
extension
MaterialTheme
.
basicCardView
{
// shadow
public
static
var
shadowDepth
:
MaterialDepth
=
.
Depth2
public
static
var
shadowColor
:
UIColor
=
Material
Theme
.
view
.
shadowColor
public
static
var
shadowColor
:
UIColor
=
Material
Color
.
black
// shape
public
static
var
masksToBounds
:
Bool
=
true
...
...
@@ -107,8 +107,8 @@ public extension MaterialTheme.basicCardView {
public
static
var
rightButtonsInsetsRef
:
MaterialInsetsType
=
MaterialInsetsToValue
(
.
Square2
)
// border
public
static
var
borderWidth
:
MaterialBorder
=
MaterialTheme
.
view
.
borderWidth
public
static
var
bordercolor
:
UIColor
=
Material
Theme
.
view
.
bordercolor
public
static
var
borderWidth
:
MaterialBorder
=
.
Border0
public
static
var
bordercolor
:
UIColor
=
Material
Color
.
black
// color
public
static
var
backgroudColor
:
UIColor
=
MaterialColor
.
blueGrey
.
darken1
...
...
@@ -116,16 +116,16 @@ public extension MaterialTheme.basicCardView {
public
static
var
pulseColorOpacity
:
CGFloat
=
0.25
// interaction
public
static
var
userInteractionEnabled
:
Bool
=
MaterialTheme
.
view
.
userInteractionEnabled
public
static
var
userInteractionEnabled
:
Bool
=
true
// image
public
static
var
contentsRect
:
CGRect
=
MaterialTheme
.
view
.
contentsRect
public
static
var
contentsCenter
:
CGRect
=
MaterialTheme
.
view
.
contentsCenter
public
static
var
contentsScale
:
CGFloat
=
MaterialTheme
.
view
.
contentsS
cale
public
static
var
contentsGravity
:
MaterialGravity
=
MaterialTheme
.
view
.
contentsGravity
public
static
var
contentsRect
:
CGRect
=
CGRectMake
(
0
,
0
,
1
,
1
)
public
static
var
contentsCenter
:
CGRect
=
CGRectMake
(
0
,
0
,
1
,
1
)
public
static
var
contentsScale
:
CGFloat
=
UIScreen
.
mainScreen
()
.
s
cale
public
static
var
contentsGravity
:
MaterialGravity
=
.
ResizeAspectFill
// position
public
static
var
zPosition
:
CGFloat
=
MaterialTheme
.
view
.
zPosition
public
static
var
zPosition
:
CGFloat
=
0
}
// navigationBarView
...
...
@@ -138,19 +138,18 @@ public extension MaterialTheme.navigationBarView {
// shadow
public
static
var
shadowDepth
:
MaterialDepth
=
.
Depth2
public
static
var
shadowColor
:
UIColor
=
Material
Theme
.
view
.
shadowColor
public
static
var
shadowColor
:
UIColor
=
Material
Color
.
black
// shape
public
static
var
masksToBounds
:
Bool
=
MaterialTheme
.
view
.
masksToBounds
public
static
var
cornerRadius
:
MaterialRadius
=
MaterialTheme
.
view
.
cornerRadius
public
static
var
contentInsetsRef
:
MaterialInsetsType
=
MaterialInsetsToValue
(
.
Square2
)
public
static
var
titleLabelInsetsRef
:
MaterialInsetsType
=
MaterialInsetsToValue
(
.
Square2
)
public
static
var
masksToBounds
:
Bool
=
true
public
static
var
cornerRadius
:
MaterialRadius
=
.
Radius0
public
static
var
titleLabelInsetsRef
:
MaterialInsetsType
=
MaterialInsetsToValue
(
.
Rectangle3
)
public
static
var
leftButtonsInsetsRef
:
MaterialInsetsType
=
MaterialInsetsToValue
(
.
Square2
)
public
static
var
rightButtonsInsetsRef
:
MaterialInsetsType
=
MaterialInsetsToValue
(
.
Square2
)
// border
public
static
var
borderWidth
:
MaterialBorder
=
MaterialTheme
.
view
.
borderWidth
public
static
var
bordercolor
:
UIColor
=
Material
Theme
.
view
.
bordercolor
public
static
var
borderWidth
:
MaterialBorder
=
.
Border0
public
static
var
bordercolor
:
UIColor
=
Material
Color
.
black
// color
public
static
var
backgroudColor
:
UIColor
=
MaterialColor
.
blue
.
accent3
...
...
@@ -160,10 +159,10 @@ public extension MaterialTheme.navigationBarView {
public
static
var
userInteractionEnabled
:
Bool
=
true
// image
public
static
var
contentsRect
:
CGRect
=
MaterialTheme
.
view
.
contentsRect
public
static
var
contentsCenter
:
CGRect
=
MaterialTheme
.
view
.
contentsCenter
public
static
var
contentsScale
:
CGFloat
=
MaterialTheme
.
view
.
contentsS
cale
public
static
var
contentsGravity
:
MaterialGravity
=
MaterialTheme
.
view
.
contentsGravity
public
static
var
contentsRect
:
CGRect
=
CGRectMake
(
0
,
0
,
1
,
1
)
public
static
var
contentsCenter
:
CGRect
=
CGRectMake
(
0
,
0
,
1
,
1
)
public
static
var
contentsScale
:
CGFloat
=
UIScreen
.
mainScreen
()
.
s
cale
public
static
var
contentsGravity
:
MaterialGravity
=
.
ResizeAspectFill
// position
public
static
var
zPosition
:
CGFloat
=
100
...
...
@@ -186,7 +185,7 @@ public extension MaterialTheme.label {
public
extension
MaterialTheme
.
flatButton
{
// shadow
public
static
var
shadowDepth
:
MaterialDepth
=
.
Depth0
public
static
var
shadowColor
:
UIColor
=
Material
Theme
.
view
.
shadowColor
public
static
var
shadowColor
:
UIColor
=
Material
Color
.
black
// shape
public
static
var
masksToBounds
:
Bool
=
true
...
...
@@ -195,13 +194,13 @@ public extension MaterialTheme.flatButton {
public
static
var
shape
:
MaterialShape
?
=
nil
// border
public
static
var
borderWidth
:
MaterialBorder
=
MaterialTheme
.
view
.
borderWidth
public
static
var
bordercolor
:
UIColor
=
Material
Theme
.
view
.
bordercolor
public
static
var
borderWidth
:
MaterialBorder
=
.
Border0
public
static
var
bordercolor
:
UIColor
=
Material
Color
.
black
// color
public
static
var
backgroudColor
:
UIColor
=
MaterialColor
.
clear
public
static
var
pulseColor
:
UIColor
=
MaterialColor
.
blue
.
accent3
public
static
var
pulseColorOpacity
:
CGFloat
=
MaterialTheme
.
pulseView
.
pulseColorOpacity
public
static
var
pulseColorOpacity
:
CGFloat
=
0.25
public
static
var
titleLabelColorForNormalState
:
UIColor
=
MaterialColor
.
blue
.
accent3
// interaction
...
...
@@ -218,7 +217,7 @@ public extension MaterialTheme.flatButton {
public
extension
MaterialTheme
.
raisedButton
{
// shadow
public
static
var
shadowDepth
:
MaterialDepth
=
.
Depth2
public
static
var
shadowColor
:
UIColor
=
Material
Theme
.
view
.
shadowColor
public
static
var
shadowColor
:
UIColor
=
Material
Color
.
black
// shape
public
static
var
masksToBounds
:
Bool
=
true
...
...
@@ -227,13 +226,13 @@ public extension MaterialTheme.raisedButton {
public
static
var
shape
:
MaterialShape
?
=
nil
// border
public
static
var
borderWidth
:
MaterialBorder
=
MaterialTheme
.
view
.
borderWidth
public
static
var
bordercolor
:
UIColor
=
Material
Theme
.
view
.
bordercolor
public
static
var
borderWidth
:
MaterialBorder
=
.
Border0
public
static
var
bordercolor
:
UIColor
=
Material
Color
.
black
// color
public
static
var
backgroudColor
:
UIColor
=
MaterialColor
.
blue
.
accent3
public
static
var
pulseColor
:
UIColor
=
MaterialColor
.
white
public
static
var
pulseColorOpacity
:
CGFloat
=
MaterialTheme
.
pulseView
.
pulseColorOpacity
public
static
var
pulseColorOpacity
:
CGFloat
=
0.25
public
static
var
titleLabelColorForNormalState
:
UIColor
=
MaterialColor
.
white
// interaction
...
...
@@ -251,7 +250,7 @@ public extension MaterialTheme.raisedButton {
public
extension
MaterialTheme
.
fabButton
{
// shadow
public
static
var
shadowDepth
:
MaterialDepth
=
.
Depth2
public
static
var
shadowColor
:
UIColor
=
Material
Theme
.
view
.
shadowColor
public
static
var
shadowColor
:
UIColor
=
Material
Color
.
black
// shape
public
static
var
masksToBounds
:
Bool
=
true
...
...
@@ -260,13 +259,13 @@ public extension MaterialTheme.fabButton {
public
static
var
shape
:
MaterialShape
?
=
.
Circle
// border
public
static
var
borderWidth
:
MaterialBorder
=
MaterialTheme
.
view
.
borderWidth
public
static
var
bordercolor
:
UIColor
=
Material
Theme
.
view
.
bordercolor
public
static
var
borderWidth
:
MaterialBorder
=
.
Border0
public
static
var
bordercolor
:
UIColor
=
Material
Color
.
black
// color
public
static
var
backgroudColor
:
UIColor
=
MaterialColor
.
red
.
darken1
public
static
var
pulseColor
:
UIColor
=
MaterialColor
.
white
public
static
var
pulseColorOpacity
:
CGFloat
=
MaterialTheme
.
pulseView
.
pulseColorOpacity
public
static
var
pulseColorOpacity
:
CGFloat
=
0.25
public
static
var
titleLabelColorForNormalState
:
UIColor
=
MaterialColor
.
white
// interaction
...
...
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