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
5bf2f0a9
Commit
5bf2f0a9
authored
Oct 12, 2015
by
Daniel Dahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated internals for visualLayer
parent
0bdc0c24
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
79 additions
and
142 deletions
+79
-142
MaterialKit.xcodeproj/project.pbxproj
+6
-12
Source/BasicCardView.swift
+0
-0
Source/CardView.swift
+35
-37
Source/FabButton.swift
+0
-2
Source/FlatButton.swift
+0
-1
Source/MaterialCollectionViewCell.swift
+0
-1
Source/MaterialLayer.swift
+14
-10
Source/MaterialPulseView.swift
+0
-2
Source/MaterialTheme.swift
+4
-63
Source/MaterialView.swift
+20
-11
Source/NavigationBarView.swift
+0
-2
Source/RaisedButton.swift
+0
-1
No files found.
MaterialKit.xcodeproj/project.pbxproj
View file @
5bf2f0a9
...
@@ -7,7 +7,6 @@
...
@@ -7,7 +7,6 @@
objects
=
{
objects
=
{
/* Begin PBXBuildFile section */
/* Begin PBXBuildFile section */
6585D21A1BBCDFBF00426D22
/* BasicCardView.swift in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
964B17D81BBB3911002A9CA0
/* BasicCardView.swift */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
65AD15EA1BC05B3A0068AF9C
/* MaterialLayer.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
65AD15E91BC05B3A0068AF9C
/* MaterialLayer.swift */
;
settings
=
{
ASSET_TAGS
=
();
};
};
65AD15EA1BC05B3A0068AF9C
/* MaterialLayer.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
65AD15E91BC05B3A0068AF9C
/* MaterialLayer.swift */
;
settings
=
{
ASSET_TAGS
=
();
};
};
65BDD1471BB5B916006F7F2B
/* MaterialView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
65BDD1461BB5B916006F7F2B
/* MaterialView.swift */
;
settings
=
{
ASSET_TAGS
=
();
};
};
65BDD1471BB5B916006F7F2B
/* MaterialView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
65BDD1461BB5B916006F7F2B
/* MaterialView.swift */
;
settings
=
{
ASSET_TAGS
=
();
};
};
65BDD1491BB5DC98006F7F2B
/* MaterialColor.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
65BDD1481BB5DC98006F7F2B
/* MaterialColor.swift */
;
settings
=
{
ASSET_TAGS
=
();
};
};
65BDD1491BB5DC98006F7F2B
/* MaterialColor.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
65BDD1481BB5DC98006F7F2B
/* MaterialColor.swift */
;
settings
=
{
ASSET_TAGS
=
();
};
};
...
@@ -57,12 +56,11 @@
...
@@ -57,12 +56,11 @@
964B17D41BBB31C2002A9CA0
/* FabButton.swift in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
65BDD17B1BB99E29006F7F2B
/* FabButton.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
,
);
};
};
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
,
);
};
};
964B17D61BBB31C2002A9CA0
/* MaterialLayout.swift in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
964B17B31BBA447F002A9CA0
/* MaterialLayout.swift */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
964B17D91BBB3911002A9CA0
/* BasicCardView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
964B17D81BBB3911002A9CA0
/* BasicCardView.swift */
;
settings
=
{
ASSET_TAGS
=
();
};
};
965C17C51BC8273D00B1059A
/* MaterialCollectionViewCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
965C17C41BC8273D00B1059A
/* MaterialCollectionViewCell.swift */
;
settings
=
{
ASSET_TAGS
=
();
};
};
965C17C51BC8273D00B1059A
/* MaterialCollectionViewCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
965C17C41BC8273D00B1059A
/* MaterialCollectionViewCell.swift */
;
settings
=
{
ASSET_TAGS
=
();
};
};
965C17C71BC8279F00B1059A
/* BasicCollectionViewCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
965C17C61BC8279F00B1059A
/* BasicCollectionViewCell.swift */
;
settings
=
{
ASSET_TAGS
=
();
};
};
965C17C71BC8279F00B1059A
/* BasicCollectionViewCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
965C17C61BC8279F00B1059A
/* BasicCollectionViewCell.swift */
;
settings
=
{
ASSET_TAGS
=
();
};
};
965C17C81BC82FEF00B1059A
/* MaterialLayer.swift in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
65AD15E91BC05B3A0068AF9C
/* MaterialLayer.swift */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
965C17C81BC82FEF00B1059A
/* MaterialLayer.swift in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
65AD15E91BC05B3A0068AF9C
/* MaterialLayer.swift */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
965C17C91BC82FEF00B1059A
/* MaterialTextLayer.swift in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
9699879B1BC5FE49006D678E
/* MaterialTextLayer.swift */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
965C17C91BC82FEF00B1059A
/* MaterialTextLayer.swift in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
9699879B1BC5FE49006D678E
/* MaterialTextLayer.swift */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
965C17CA1BC82FEF00B1059A
/*
ImageCardView.swift in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96D26BFC1BC23649006478BD
/* Image
CardView.swift */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
965C17CA1BC82FEF00B1059A
/*
CardView.swift in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96D26BFC1BC23649006478BD
/*
CardView.swift */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
965C17CB1BC82FEF00B1059A
/* MaterialCollectionViewCell.swift in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
965C17C41BC8273D00B1059A
/* MaterialCollectionViewCell.swift */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
965C17CB1BC82FEF00B1059A
/* MaterialCollectionViewCell.swift in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
965C17C41BC8273D00B1059A
/* MaterialCollectionViewCell.swift */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
965C17CC1BC82FEF00B1059A
/* BasicCollectionViewCell.swift in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
965C17C61BC8279F00B1059A
/* BasicCollectionViewCell.swift */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
965C17CC1BC82FEF00B1059A
/* BasicCollectionViewCell.swift in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
965C17C61BC8279F00B1059A
/* BasicCollectionViewCell.swift */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
9693BF861BCB0E0A0087054A
/* Material+UIFont.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
9693BF851BCB0E0A0087054A
/* Material+UIFont.swift */
;
settings
=
{
ASSET_TAGS
=
();
};
};
9693BF861BCB0E0A0087054A
/* Material+UIFont.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
9693BF851BCB0E0A0087054A
/* Material+UIFont.swift */
;
settings
=
{
ASSET_TAGS
=
();
};
};
...
@@ -74,7 +72,7 @@
...
@@ -74,7 +72,7 @@
9693BF8F1BCB35910087054A
/* MaterialTransitionAnimation.swift in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96C4FABD1BC3168900E4FFC3
/* MaterialTransitionAnimation.swift */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
9693BF8F1BCB35910087054A
/* MaterialTransitionAnimation.swift in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96C4FABD1BC3168900E4FFC3
/* MaterialTransitionAnimation.swift */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
9699879C1BC5FE49006D678E
/* MaterialTextLayer.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
9699879B1BC5FE49006D678E
/* MaterialTextLayer.swift */
;
settings
=
{
ASSET_TAGS
=
();
};
};
9699879C1BC5FE49006D678E
/* MaterialTextLayer.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
9699879B1BC5FE49006D678E
/* MaterialTextLayer.swift */
;
settings
=
{
ASSET_TAGS
=
();
};
};
96C4FABE1BC3168900E4FFC3
/* MaterialTransitionAnimation.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96C4FABD1BC3168900E4FFC3
/* MaterialTransitionAnimation.swift */
;
settings
=
{
ASSET_TAGS
=
();
};
};
96C4FABE1BC3168900E4FFC3
/* MaterialTransitionAnimation.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96C4FABD1BC3168900E4FFC3
/* MaterialTransitionAnimation.swift */
;
settings
=
{
ASSET_TAGS
=
();
};
};
96D26BFD1BC23649006478BD
/*
ImageCardView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96D26BFC1BC23649006478BD
/* Image
CardView.swift */
;
settings
=
{
ASSET_TAGS
=
();
};
};
96D26BFD1BC23649006478BD
/*
CardView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96D26BFC1BC23649006478BD
/*
CardView.swift */
;
settings
=
{
ASSET_TAGS
=
();
};
};
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 */
;
};
...
@@ -124,14 +122,13 @@
...
@@ -124,14 +122,13 @@
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>"
;
};
964B17D81BBB3911002A9CA0
/* BasicCardView.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
BasicCardView.swift
;
sourceTree
=
"<group>"
;
};
965C17C41BC8273D00B1059A
/* MaterialCollectionViewCell.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
MaterialCollectionViewCell.swift
;
sourceTree
=
"<group>"
;
};
965C17C41BC8273D00B1059A
/* MaterialCollectionViewCell.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
MaterialCollectionViewCell.swift
;
sourceTree
=
"<group>"
;
};
965C17C61BC8279F00B1059A
/* BasicCollectionViewCell.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
BasicCollectionViewCell.swift
;
sourceTree
=
"<group>"
;
};
965C17C61BC8279F00B1059A
/* BasicCollectionViewCell.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
BasicCollectionViewCell.swift
;
sourceTree
=
"<group>"
;
};
9693BF851BCB0E0A0087054A
/* Material+UIFont.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
"Material+UIFont.swift"
;
sourceTree
=
"<group>"
;
};
9693BF851BCB0E0A0087054A
/* Material+UIFont.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
"Material+UIFont.swift"
;
sourceTree
=
"<group>"
;
};
9693BF891BCB35520087054A
/* SideNavigationViewController.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
SideNavigationViewController.swift
;
sourceTree
=
"<group>"
;
};
9693BF891BCB35520087054A
/* SideNavigationViewController.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
SideNavigationViewController.swift
;
sourceTree
=
"<group>"
;
};
9699879B1BC5FE49006D678E
/* MaterialTextLayer.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
MaterialTextLayer.swift
;
sourceTree
=
"<group>"
;
};
9699879B1BC5FE49006D678E
/* MaterialTextLayer.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
MaterialTextLayer.swift
;
sourceTree
=
"<group>"
;
};
96C4FABD1BC3168900E4FFC3
/* MaterialTransitionAnimation.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
MaterialTransitionAnimation.swift
;
sourceTree
=
"<group>"
;
};
96C4FABD1BC3168900E4FFC3
/* MaterialTransitionAnimation.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
MaterialTransitionAnimation.swift
;
sourceTree
=
"<group>"
;
};
96D26BFC1BC23649006478BD
/*
ImageCardView.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
Image
CardView.swift
;
sourceTree
=
"<group>"
;
};
96D26BFC1BC23649006478BD
/*
CardView.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
CardView.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>"
;
};
...
@@ -292,8 +289,7 @@
...
@@ -292,8 +289,7 @@
964B17D71BBB38E2002A9CA0
/* Card */
=
{
964B17D71BBB38E2002A9CA0
/* Card */
=
{
isa
=
PBXGroup
;
isa
=
PBXGroup
;
children
=
(
children
=
(
964B17D81BBB3911002A9CA0
/* BasicCardView.swift */
,
96D26BFC1BC23649006478BD
/* CardView.swift */
,
96D26BFC1BC23649006478BD
/* ImageCardView.swift */
,
);
);
name
=
Card
;
name
=
Card
;
sourceTree
=
"<group>"
;
sourceTree
=
"<group>"
;
...
@@ -377,10 +373,9 @@
...
@@ -377,10 +373,9 @@
964B17D41BBB31C2002A9CA0
/* FabButton.swift in Headers */
,
964B17D41BBB31C2002A9CA0
/* FabButton.swift in Headers */
,
964B17D51BBB31C2002A9CA0
/* MaterialAnimation.swift in Headers */
,
964B17D51BBB31C2002A9CA0
/* MaterialAnimation.swift in Headers */
,
964B17D61BBB31C2002A9CA0
/* MaterialLayout.swift in Headers */
,
964B17D61BBB31C2002A9CA0
/* MaterialLayout.swift in Headers */
,
6585D21A1BBCDFBF00426D22
/* BasicCardView.swift in Headers */
,
965C17C81BC82FEF00B1059A
/* MaterialLayer.swift in Headers */
,
965C17C81BC82FEF00B1059A
/* MaterialLayer.swift in Headers */
,
965C17C91BC82FEF00B1059A
/* MaterialTextLayer.swift in Headers */
,
965C17C91BC82FEF00B1059A
/* MaterialTextLayer.swift in Headers */
,
965C17CA1BC82FEF00B1059A
/*
Image
CardView.swift in Headers */
,
965C17CA1BC82FEF00B1059A
/* CardView.swift in Headers */
,
965C17CB1BC82FEF00B1059A
/* MaterialCollectionViewCell.swift in Headers */
,
965C17CB1BC82FEF00B1059A
/* MaterialCollectionViewCell.swift in Headers */
,
965C17CC1BC82FEF00B1059A
/* BasicCollectionViewCell.swift in Headers */
,
965C17CC1BC82FEF00B1059A
/* BasicCollectionViewCell.swift in Headers */
,
9693BF8B1BCB35910087054A
/* Material+UIFont.swift in Headers */
,
9693BF8B1BCB35910087054A
/* Material+UIFont.swift in Headers */
,
...
@@ -500,8 +495,7 @@
...
@@ -500,8 +495,7 @@
65BDD16C1BB88D1A006F7F2B
/* MaterialShape.swift in Sources */
,
65BDD16C1BB88D1A006F7F2B
/* MaterialShape.swift in Sources */
,
65AD15EA1BC05B3A0068AF9C
/* MaterialLayer.swift in Sources */
,
65AD15EA1BC05B3A0068AF9C
/* MaterialLayer.swift in Sources */
,
65BDD1521BB6EE7C006F7F2B
/* RobotoFont.swift in Sources */
,
65BDD1521BB6EE7C006F7F2B
/* RobotoFont.swift in Sources */
,
964B17D91BBB3911002A9CA0
/* BasicCardView.swift in Sources */
,
96D26BFD1BC23649006478BD
/* CardView.swift in Sources */
,
96D26BFD1BC23649006478BD
/* ImageCardView.swift in Sources */
,
65BDD1591BB6FE3E006F7F2B
/* FlatButton.swift in Sources */
,
65BDD1591BB6FE3E006F7F2B
/* FlatButton.swift in Sources */
,
65BDD1791BB99C0F006F7F2B
/* RaisedButton.swift in Sources */
,
65BDD1791BB99C0F006F7F2B
/* RaisedButton.swift in Sources */
,
964B17B41BBA447F002A9CA0
/* MaterialLayout.swift in Sources */
,
964B17B41BBA447F002A9CA0
/* MaterialLayout.swift in Sources */
,
...
...
Source/BasicCardView.swift
deleted
100644 → 0
View file @
0bdc0c24
This diff is collapsed.
Click to expand it.
Source/
Image
CardView.swift
→
Source/CardView.swift
View file @
5bf2f0a9
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
import
UIKit
import
UIKit
public
class
Image
CardView
:
MaterialPulseView
{
public
class
CardView
:
MaterialPulseView
{
//
//
// :name: dividerLayer
// :name: dividerLayer
//
//
...
@@ -36,7 +36,7 @@ public class ImageCardView : MaterialPulseView {
...
@@ -36,7 +36,7 @@ public class ImageCardView : MaterialPulseView {
/**
/**
:name: divider
:name: divider
*/
*/
public
var
divider
:
Bool
=
MaterialTheme
.
basicC
ardView
.
divider
{
public
var
divider
:
Bool
=
MaterialTheme
.
c
ardView
.
divider
{
didSet
{
didSet
{
reloadView
()
reloadView
()
}
}
...
@@ -61,9 +61,9 @@ public class ImageCardView : MaterialPulseView {
...
@@ -61,9 +61,9 @@ public class ImageCardView : MaterialPulseView {
}
}
}
}
/
/
/
**
//
:name: imageLayer
:name: imageLayer
/
/
*
/
public
private(set)
lazy
var
imageLayer
:
CAShapeLayer
=
CAShapeLayer
()
public
private(set)
lazy
var
imageLayer
:
CAShapeLayer
=
CAShapeLayer
()
/**
/**
...
@@ -326,12 +326,12 @@ public class ImageCardView : MaterialPulseView {
...
@@ -326,12 +326,12 @@ public class ImageCardView : MaterialPulseView {
imageLayer
.
frame
.
size
.
width
=
bounds
.
size
.
width
imageLayer
.
frame
.
size
.
width
=
bounds
.
size
.
width
// divider
// divider
if
true
==
divider
{
if
divider
{
var
y
:
CGFloat
=
0
var
y
:
CGFloat
=
contentInsetsRef
!.
bottom
+
dividerInsetsRef
!.
bottom
if
0
<
leftButtons
?
.
count
{
if
0
<
leftButtons
?
.
count
{
y
+=
contentInsetsRef
!.
bottom
+
leftButtonsInsetsRef
!.
top
+
leftButtonsInsetsRef
!.
bottom
+
leftButtons
!
[
0
]
.
frame
.
size
.
height
y
+=
leftButtonsInsetsRef
!.
top
+
leftButtonsInsetsRef
!.
bottom
+
leftButtons
!
[
0
]
.
frame
.
size
.
height
}
else
if
0
<
rightButtons
?
.
count
{
}
else
if
0
<
rightButtons
?
.
count
{
y
+=
contentInsetsRef
!.
bottom
+
rightButtonsInsetsRef
!.
top
+
rightButtonsInsetsRef
!.
bottom
+
rightButtons
!
[
0
]
.
frame
.
size
.
height
y
+=
rightButtonsInsetsRef
!.
top
+
rightButtonsInsetsRef
!.
bottom
+
rightButtons
!
[
0
]
.
frame
.
size
.
height
}
}
if
0
<
y
{
if
0
<
y
{
prepareDivider
(
bounds
.
size
.
height
-
y
-
0.5
,
width
:
bounds
.
size
.
width
)
prepareDivider
(
bounds
.
size
.
height
-
y
-
0.5
,
width
:
bounds
.
size
.
width
)
...
@@ -347,29 +347,27 @@ public class ImageCardView : MaterialPulseView {
...
@@ -347,29 +347,27 @@ public class ImageCardView : MaterialPulseView {
*/
*/
public
override
func
prepareView
()
{
public
override
func
prepareView
()
{
super
.
prepareView
()
super
.
prepareView
()
userInteractionEnabled
=
MaterialTheme
.
imageC
ardView
.
userInteractionEnabled
userInteractionEnabled
=
MaterialTheme
.
c
ardView
.
userInteractionEnabled
backgroundColor
=
MaterialTheme
.
imageC
ardView
.
backgroundColor
backgroundColor
=
MaterialTheme
.
c
ardView
.
backgroundColor
pulseColor
=
MaterialTheme
.
imageC
ardView
.
pulseColor
pulseColor
=
MaterialTheme
.
c
ardView
.
pulseColor
contentInsetsRef
=
MaterialTheme
.
imageC
ardView
.
contentInsetsRef
contentInsetsRef
=
MaterialTheme
.
c
ardView
.
contentInsetsRef
titleLabelInsetsRef
=
MaterialTheme
.
imageC
ardView
.
titleLabelInsetsRef
titleLabelInsetsRef
=
MaterialTheme
.
c
ardView
.
titleLabelInsetsRef
detailLabelInsetsRef
=
MaterialTheme
.
imageC
ardView
.
detailLabelInsetsRef
detailLabelInsetsRef
=
MaterialTheme
.
c
ardView
.
detailLabelInsetsRef
leftButtonsInsetsRef
=
MaterialTheme
.
imageC
ardView
.
leftButtonsInsetsRef
leftButtonsInsetsRef
=
MaterialTheme
.
c
ardView
.
leftButtonsInsetsRef
rightButtonsInsetsRef
=
MaterialTheme
.
imageC
ardView
.
rightButtonsInsetsRef
rightButtonsInsetsRef
=
MaterialTheme
.
c
ardView
.
rightButtonsInsetsRef
dividerInsetsRef
=
MaterialTheme
.
imageC
ardView
.
dividerInsetsRef
dividerInsetsRef
=
MaterialTheme
.
c
ardView
.
dividerInsetsRef
contentsRect
=
MaterialTheme
.
imageCardView
.
contentsRect
contentsRect
=
MaterialTheme
.
cardView
.
contentsRect
contentsCenter
=
MaterialTheme
.
imageCardView
.
contentsCenter
contentsCenter
=
MaterialTheme
.
cardView
.
contentsCenter
contentsScale
=
MaterialTheme
.
imageCardView
.
contentsScale
contentsScale
=
MaterialTheme
.
cardView
.
contentsScale
contentsGravity
=
MaterialTheme
.
imageCardView
.
contentsGravity
contentsGravity
=
MaterialTheme
.
cardView
.
contentsGravity
shadowDepth
=
MaterialTheme
.
imageCardView
.
shadowDepth
shadowDepth
=
MaterialTheme
.
cardView
.
shadowDepth
shadowColor
=
MaterialTheme
.
imageCardView
.
shadowColor
shadowColor
=
MaterialTheme
.
cardView
.
shadowColor
zPosition
=
MaterialTheme
.
imageCardView
.
zPosition
zPosition
=
MaterialTheme
.
cardView
.
zPosition
masksToBounds
=
MaterialTheme
.
imageCardView
.
masksToBounds
borderWidth
=
MaterialTheme
.
cardView
.
borderWidth
cornerRadius
=
MaterialTheme
.
imageCardView
.
cornerRadius
borderColor
=
MaterialTheme
.
cardView
.
bordercolor
borderWidth
=
MaterialTheme
.
imageCardView
.
borderWidth
dividerColor
=
MaterialTheme
.
cardView
.
dividerColor
borderColor
=
MaterialTheme
.
imageCardView
.
bordercolor
dividerColor
=
MaterialTheme
.
imageCardView
.
dividerColor
}
}
/**
/**
...
@@ -496,18 +494,18 @@ public class ImageCardView : MaterialPulseView {
...
@@ -496,18 +494,18 @@ public class ImageCardView : MaterialPulseView {
if
nil
!=
detailLabel
{
if
nil
!=
detailLabel
{
if
nil
==
metrics
[
"insetC"
]
{
if
nil
==
metrics
[
"insetC"
]
{
metrics
[
"insetBottom"
]
=
contentInsetsRef
!.
bottom
+
detailLabelInsetsRef
!.
bottom
metrics
[
"insetBottom"
]
=
contentInsetsRef
!.
bottom
+
detailLabelInsetsRef
!.
bottom
+
(
divider
?
dividerInsetsRef
!.
top
+
dividerInsetsRef
!.
bottom
:
0
)
}
else
{
}
else
{
metrics
[
"insetC"
]
=
(
metrics
[
"insetC"
]
as!
CGFloat
)
+
detailLabelInsetsRef
!.
bottom
metrics
[
"insetC"
]
=
(
metrics
[
"insetC"
]
as!
CGFloat
)
+
detailLabelInsetsRef
!.
bottom
+
(
divider
?
dividerInsetsRef
!.
top
+
dividerInsetsRef
!.
bottom
:
0
)
}
}
}
else
if
nil
!=
titleLabel
{
}
else
if
nil
!=
titleLabel
{
if
nil
==
metrics
[
"insetC"
]
{
if
nil
==
metrics
[
"insetC"
]
{
metrics
[
"insetBottom"
]
=
contentInsetsRef
!.
bottom
+
titleLabelInsetsRef
!.
bottom
metrics
[
"insetBottom"
]
=
contentInsetsRef
!.
bottom
+
titleLabelInsetsRef
!.
bottom
+
(
divider
?
dividerInsetsRef
!.
top
+
dividerInsetsRef
!.
bottom
:
0
)
}
else
{
}
else
{
metrics
[
"insetC"
]
=
(
metrics
[
"insetC"
]
as!
CGFloat
)
+
titleLabelInsetsRef
!.
bottom
metrics
[
"insetC"
]
=
(
metrics
[
"insetC"
]
as!
CGFloat
)
+
titleLabelInsetsRef
!.
bottom
+
(
divider
?
dividerInsetsRef
!.
top
+
dividerInsetsRef
!.
bottom
:
0
)
}
}
}
else
if
nil
!=
metrics
[
"insetC"
]
{
}
else
if
nil
!=
metrics
[
"insetC"
]
{
metrics
[
"insetC"
]
=
(
metrics
[
"insetC"
]
as!
CGFloat
)
+
contentInsetsRef
!.
top
metrics
[
"insetC"
]
=
(
metrics
[
"insetC"
]
as!
CGFloat
)
+
contentInsetsRef
!.
top
+
(
divider
?
dividerInsetsRef
!.
top
+
dividerInsetsRef
!.
bottom
:
0
)
}
}
if
0
<
views
.
count
{
if
0
<
views
.
count
{
...
@@ -532,11 +530,11 @@ public class ImageCardView : MaterialPulseView {
...
@@ -532,11 +530,11 @@ public class ImageCardView : MaterialPulseView {
internal
func
prepareDivider
(
y
:
CGFloat
,
width
:
CGFloat
)
{
internal
func
prepareDivider
(
y
:
CGFloat
,
width
:
CGFloat
)
{
if
nil
==
dividerLayer
{
if
nil
==
dividerLayer
{
dividerLayer
=
CAShapeLayer
()
dividerLayer
=
CAShapeLayer
()
dividerLayer
!.
backgroundColor
=
dividerColor
?
.
CGColor
dividerLayer
!.
frame
=
CGRectMake
(
0
,
y
,
width
,
1
)
dividerLayer
!.
zPosition
=
0
dividerLayer
!.
zPosition
=
0
layer
.
addSublayer
(
dividerLayer
!
)
layer
.
addSublayer
(
dividerLayer
!
)
}
}
dividerLayer
?
.
backgroundColor
=
dividerColor
?
.
CGColor
dividerLayer
?
.
frame
=
CGRectMake
(
dividerInsetsRef
!.
left
,
y
,
width
-
dividerInsetsRef
!.
left
-
dividerInsetsRef
!.
right
,
1
)
}
}
//
//
...
...
Source/FabButton.swift
View file @
5bf2f0a9
...
@@ -35,8 +35,6 @@ public class FabButton : MaterialButton {
...
@@ -35,8 +35,6 @@ public class FabButton : MaterialButton {
shadowDepth
=
MaterialTheme
.
fabButton
.
shadowDepth
shadowDepth
=
MaterialTheme
.
fabButton
.
shadowDepth
shadowColor
=
MaterialTheme
.
fabButton
.
shadowColor
shadowColor
=
MaterialTheme
.
fabButton
.
shadowColor
zPosition
=
MaterialTheme
.
fabButton
.
zPosition
zPosition
=
MaterialTheme
.
fabButton
.
zPosition
masksToBounds
=
MaterialTheme
.
fabButton
.
masksToBounds
cornerRadius
=
MaterialTheme
.
fabButton
.
cornerRadius
borderWidth
=
MaterialTheme
.
fabButton
.
borderWidth
borderWidth
=
MaterialTheme
.
fabButton
.
borderWidth
borderColor
=
MaterialTheme
.
fabButton
.
bordercolor
borderColor
=
MaterialTheme
.
fabButton
.
bordercolor
contentInsets
=
MaterialTheme
.
fabButton
.
contentInsets
contentInsets
=
MaterialTheme
.
fabButton
.
contentInsets
...
...
Source/FlatButton.swift
View file @
5bf2f0a9
...
@@ -35,7 +35,6 @@ public class FlatButton : MaterialButton {
...
@@ -35,7 +35,6 @@ public class FlatButton : MaterialButton {
shadowDepth
=
MaterialTheme
.
flatButton
.
shadowDepth
shadowDepth
=
MaterialTheme
.
flatButton
.
shadowDepth
shadowColor
=
MaterialTheme
.
flatButton
.
shadowColor
shadowColor
=
MaterialTheme
.
flatButton
.
shadowColor
zPosition
=
MaterialTheme
.
flatButton
.
zPosition
zPosition
=
MaterialTheme
.
flatButton
.
zPosition
masksToBounds
=
MaterialTheme
.
flatButton
.
masksToBounds
cornerRadius
=
MaterialTheme
.
flatButton
.
cornerRadius
cornerRadius
=
MaterialTheme
.
flatButton
.
cornerRadius
borderWidth
=
MaterialTheme
.
flatButton
.
borderWidth
borderWidth
=
MaterialTheme
.
flatButton
.
borderWidth
borderColor
=
MaterialTheme
.
flatButton
.
bordercolor
borderColor
=
MaterialTheme
.
flatButton
.
bordercolor
...
...
Source/MaterialCollectionViewCell.swift
View file @
5bf2f0a9
...
@@ -452,7 +452,6 @@ public class MaterialCollectionViewCell : UICollectionViewCell, UIGestureRecogni
...
@@ -452,7 +452,6 @@ public class MaterialCollectionViewCell : UICollectionViewCell, UIGestureRecogni
shadowDepth
=
MaterialTheme
.
flatButton
.
shadowDepth
shadowDepth
=
MaterialTheme
.
flatButton
.
shadowDepth
shadowColor
=
MaterialTheme
.
flatButton
.
shadowColor
shadowColor
=
MaterialTheme
.
flatButton
.
shadowColor
zPosition
=
MaterialTheme
.
flatButton
.
zPosition
zPosition
=
MaterialTheme
.
flatButton
.
zPosition
masksToBounds
=
MaterialTheme
.
flatButton
.
masksToBounds
cornerRadius
=
MaterialTheme
.
flatButton
.
cornerRadius
cornerRadius
=
MaterialTheme
.
flatButton
.
cornerRadius
borderWidth
=
MaterialTheme
.
flatButton
.
borderWidth
borderWidth
=
MaterialTheme
.
flatButton
.
borderWidth
borderColor
=
MaterialTheme
.
flatButton
.
bordercolor
borderColor
=
MaterialTheme
.
flatButton
.
bordercolor
...
...
Source/MaterialLayer.swift
View file @
5bf2f0a9
...
@@ -158,11 +158,7 @@ public class MaterialLayer : CAShapeLayer {
...
@@ -158,11 +158,7 @@ public class MaterialLayer : CAShapeLayer {
:name: cornerRadius
:name: cornerRadius
*/
*/
public
override
var
cornerRadius
:
CGFloat
{
public
override
var
cornerRadius
:
CGFloat
{
get
{
didSet
{
return
visualLayer
.
cornerRadius
}
set
(
value
)
{
visualLayer
.
cornerRadius
=
value
if
.
Circle
==
shape
{
if
.
Circle
==
shape
{
shape
=
.
None
shape
=
.
None
}
}
...
@@ -224,10 +220,8 @@ public class MaterialLayer : CAShapeLayer {
...
@@ -224,10 +220,8 @@ public class MaterialLayer : CAShapeLayer {
public
override
func
layoutSublayers
()
{
public
override
func
layoutSublayers
()
{
super
.
layoutSublayers
()
super
.
layoutSublayers
()
visualLayer
.
frame
=
bounds
visualLayer
.
masksToBounds
=
true
visualLayer
.
position
=
CGPointMake
(
width
/
2
,
height
/
2
)
prepareShape
()
prepareShape
()
prepareVisualLayer
()
}
}
/**
/**
...
@@ -236,7 +230,7 @@ public class MaterialLayer : CAShapeLayer {
...
@@ -236,7 +230,7 @@ public class MaterialLayer : CAShapeLayer {
public
func
animation
(
animation
:
CAAnimation
)
{
public
func
animation
(
animation
:
CAAnimation
)
{
animation
.
delegate
=
self
animation
.
delegate
=
self
if
let
a
:
CABasicAnimation
=
animation
as?
CABasicAnimation
{
if
let
a
:
CABasicAnimation
=
animation
as?
CABasicAnimation
{
a
.
fromValue
=
valueForKeyPath
(
a
.
keyPath
!
)
//(nil == presentationLayer() ? self : presentationLayer() as! CALayer).valueForKeyPath(a.keyPath!)
a
.
fromValue
=
valueForKeyPath
(
a
.
keyPath
!
)
}
}
if
let
a
:
CAPropertyAnimation
=
animation
as?
CAPropertyAnimation
{
if
let
a
:
CAPropertyAnimation
=
animation
as?
CAPropertyAnimation
{
addAnimation
(
a
,
forKey
:
a
.
keyPath
!
)
addAnimation
(
a
,
forKey
:
a
.
keyPath
!
)
...
@@ -271,6 +265,7 @@ public class MaterialLayer : CAShapeLayer {
...
@@ -271,6 +265,7 @@ public class MaterialLayer : CAShapeLayer {
animationDidStop
(
x
,
finished
:
true
)
animationDidStop
(
x
,
finished
:
true
)
}
}
}
}
prepareVisualLayer
()
}
}
/**
/**
...
@@ -278,7 +273,7 @@ public class MaterialLayer : CAShapeLayer {
...
@@ -278,7 +273,7 @@ public class MaterialLayer : CAShapeLayer {
*/
*/
public
func
prepareLayer
()
{
public
func
prepareLayer
()
{
// visualLayer
// visualLayer
masksToBounds
=
true
visualLayer
.
masksToBounds
=
true
visualLayer
.
zPosition
=
-
1
visualLayer
.
zPosition
=
-
1
addSublayer
(
visualLayer
)
addSublayer
(
visualLayer
)
}
}
...
@@ -291,4 +286,13 @@ public class MaterialLayer : CAShapeLayer {
...
@@ -291,4 +286,13 @@ public class MaterialLayer : CAShapeLayer {
cornerRadius
=
width
/
2
cornerRadius
=
width
/
2
}
}
}
}
//
// :name: prepareVisualLayer
//
internal
func
prepareVisualLayer
()
{
visualLayer
.
frame
=
bounds
visualLayer
.
position
=
CGPointMake
(
width
/
2
,
height
/
2
)
visualLayer
.
cornerRadius
=
cornerRadius
}
}
}
Source/MaterialPulseView.swift
View file @
5bf2f0a9
...
@@ -153,8 +153,6 @@ public class MaterialPulseView : MaterialView {
...
@@ -153,8 +153,6 @@ public class MaterialPulseView : MaterialView {
shadowDepth
=
MaterialTheme
.
pulseView
.
shadowDepth
shadowDepth
=
MaterialTheme
.
pulseView
.
shadowDepth
shadowColor
=
MaterialTheme
.
pulseView
.
shadowColor
shadowColor
=
MaterialTheme
.
pulseView
.
shadowColor
zPosition
=
MaterialTheme
.
pulseView
.
zPosition
zPosition
=
MaterialTheme
.
pulseView
.
zPosition
masksToBounds
=
MaterialTheme
.
pulseView
.
masksToBounds
cornerRadius
=
MaterialTheme
.
pulseView
.
cornerRadius
borderWidth
=
MaterialTheme
.
pulseView
.
borderWidth
borderWidth
=
MaterialTheme
.
pulseView
.
borderWidth
borderColor
=
MaterialTheme
.
pulseView
.
bordercolor
borderColor
=
MaterialTheme
.
pulseView
.
bordercolor
...
...
Source/MaterialTheme.swift
View file @
5bf2f0a9
...
@@ -21,8 +21,7 @@ import UIKit
...
@@ -21,8 +21,7 @@ import UIKit
public
struct
MaterialTheme
{
public
struct
MaterialTheme
{
public
struct
view
{}
public
struct
view
{}
public
struct
pulseView
{}
public
struct
pulseView
{}
public
struct
basicCardView
{}
public
struct
cardView
{}
public
struct
imageCardView
{}
public
struct
navigationBarView
{}
public
struct
navigationBarView
{}
public
struct
textLayer
{}
public
struct
textLayer
{}
public
struct
label
{}
public
struct
label
{}
...
@@ -37,10 +36,6 @@ public extension MaterialTheme.view {
...
@@ -37,10 +36,6 @@ public extension MaterialTheme.view {
public
static
var
shadowDepth
:
MaterialDepth
=
.
None
public
static
var
shadowDepth
:
MaterialDepth
=
.
None
public
static
var
shadowColor
:
UIColor
=
MaterialColor
.
black
public
static
var
shadowColor
:
UIColor
=
MaterialColor
.
black
// shape
public
static
var
masksToBounds
:
Bool
=
false
public
static
var
cornerRadius
:
MaterialRadius
=
.
None
// border
// border
public
static
var
borderWidth
:
MaterialBorder
=
.
None
public
static
var
borderWidth
:
MaterialBorder
=
.
None
public
static
var
bordercolor
:
UIColor
=
MaterialColor
.
black
public
static
var
bordercolor
:
UIColor
=
MaterialColor
.
black
...
@@ -67,10 +62,6 @@ public extension MaterialTheme.pulseView {
...
@@ -67,10 +62,6 @@ public extension MaterialTheme.pulseView {
public
static
var
shadowDepth
:
MaterialDepth
=
.
None
public
static
var
shadowDepth
:
MaterialDepth
=
.
None
public
static
var
shadowColor
:
UIColor
=
MaterialColor
.
black
public
static
var
shadowColor
:
UIColor
=
MaterialColor
.
black
// shape
public
static
var
masksToBounds
:
Bool
=
false
public
static
var
cornerRadius
:
MaterialRadius
=
.
None
// border
// border
public
static
var
borderWidth
:
MaterialBorder
=
.
None
public
static
var
borderWidth
:
MaterialBorder
=
.
None
public
static
var
bordercolor
:
UIColor
=
MaterialColor
.
black
public
static
var
bordercolor
:
UIColor
=
MaterialColor
.
black
...
@@ -93,63 +84,19 @@ public extension MaterialTheme.pulseView {
...
@@ -93,63 +84,19 @@ public extension MaterialTheme.pulseView {
public
static
var
zPosition
:
CGFloat
=
0
public
static
var
zPosition
:
CGFloat
=
0
}
}
// basicCardView
// cardView
public
extension
MaterialTheme
.
basicCardView
{
public
extension
MaterialTheme
.
cardView
{
// shadow
public
static
var
shadowDepth
:
MaterialDepth
=
.
Depth2
public
static
var
shadowColor
:
UIColor
=
MaterialColor
.
black
// shape
public
static
var
masksToBounds
:
Bool
=
false
public
static
var
cornerRadius
:
MaterialRadius
=
.
None
public
static
var
contentInsetsRef
:
MaterialInsetsType
=
MaterialInsetsToValue
(
.
Square2
)
public
static
var
titleLabelInsetsRef
:
MaterialInsetsType
=
MaterialInsetsToValue
(
.
Square2
)
public
static
var
detailLabelInsetsRef
:
MaterialInsetsType
=
MaterialInsetsToValue
(
.
Square2
)
public
static
var
leftButtonsInsetsRef
:
MaterialInsetsType
=
MaterialInsetsToValue
(
.
None
)
public
static
var
rightButtonsInsetsRef
:
MaterialInsetsType
=
MaterialInsetsToValue
(
.
None
)
public
static
var
dividerInsetsRef
:
MaterialInsetsType
=
MaterialInsetsToValue
(
.
None
)
// border
public
static
var
borderWidth
:
MaterialBorder
=
.
None
public
static
var
bordercolor
:
UIColor
=
MaterialColor
.
black
// color
public
static
var
backgroundColor
:
UIColor
=
MaterialColor
.
white
public
static
var
pulseColor
:
UIColor
=
MaterialColor
.
blueGrey
.
lighten4
public
static
var
pulseColorOpacity
:
CGFloat
=
0.25
// interaction
public
static
var
userInteractionEnabled
:
Bool
=
true
// image
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
()
.
scale
public
static
var
contentsGravity
:
MaterialGravity
=
.
ResizeAspectFill
// position
public
static
var
zPosition
:
CGFloat
=
0
// divider
public
static
var
divider
:
Bool
=
true
public
static
var
dividerColor
:
UIColor
=
MaterialColor
.
blueGrey
.
lighten5
}
// imageCardView
public
extension
MaterialTheme
.
imageCardView
{
// shadow
// shadow
public
static
var
shadowDepth
:
MaterialDepth
=
.
Depth2
public
static
var
shadowDepth
:
MaterialDepth
=
.
Depth2
public
static
var
shadowColor
:
UIColor
=
MaterialColor
.
black
public
static
var
shadowColor
:
UIColor
=
MaterialColor
.
black
// shape
// shape
public
static
var
masksToBounds
:
Bool
=
false
public
static
var
cornerRadius
:
MaterialRadius
=
.
None
public
static
var
contentInsetsRef
:
MaterialInsetsType
=
MaterialInsetsToValue
(
.
Square2
)
public
static
var
contentInsetsRef
:
MaterialInsetsType
=
MaterialInsetsToValue
(
.
Square2
)
public
static
var
titleLabelInsetsRef
:
MaterialInsetsType
=
MaterialInsetsToValue
(
.
Square2
)
public
static
var
titleLabelInsetsRef
:
MaterialInsetsType
=
MaterialInsetsToValue
(
.
Square2
)
public
static
var
detailLabelInsetsRef
:
MaterialInsetsType
=
MaterialInsetsToValue
(
.
Square2
)
public
static
var
detailLabelInsetsRef
:
MaterialInsetsType
=
MaterialInsetsToValue
(
.
Square2
)
public
static
var
leftButtonsInsetsRef
:
MaterialInsetsType
=
MaterialInsetsToValue
(
.
None
)
public
static
var
leftButtonsInsetsRef
:
MaterialInsetsType
=
MaterialInsetsToValue
(
.
None
)
public
static
var
rightButtonsInsetsRef
:
MaterialInsetsType
=
MaterialInsetsToValue
(
.
None
)
public
static
var
rightButtonsInsetsRef
:
MaterialInsetsType
=
MaterialInsetsToValue
(
.
None
)
public
static
var
dividerInsetsRef
:
MaterialInsetsType
=
MaterialInsetsToValue
(
.
None
)
public
static
var
dividerInsetsRef
:
MaterialInsetsType
=
(
top
:
8
,
left
:
0
,
bottom
:
8
,
right
:
0
)
// border
// border
public
static
var
borderWidth
:
MaterialBorder
=
.
None
public
static
var
borderWidth
:
MaterialBorder
=
.
None
...
@@ -190,8 +137,6 @@ public extension MaterialTheme.navigationBarView {
...
@@ -190,8 +137,6 @@ public extension MaterialTheme.navigationBarView {
public
static
var
shadowColor
:
UIColor
=
MaterialColor
.
black
public
static
var
shadowColor
:
UIColor
=
MaterialColor
.
black
// shape
// shape
public
static
var
masksToBounds
:
Bool
=
false
public
static
var
cornerRadius
:
MaterialRadius
=
.
None
public
static
var
contentInsetsRef
:
MaterialInsetsType
=
MaterialInsetsToValue
(
.
Square2
)
public
static
var
contentInsetsRef
:
MaterialInsetsType
=
MaterialInsetsToValue
(
.
Square2
)
public
static
var
titleLabelInsetsRef
:
MaterialInsetsType
=
(
top
:
20
,
left
:
0
,
bottom
:
0
,
right
:
0
)
public
static
var
titleLabelInsetsRef
:
MaterialInsetsType
=
(
top
:
20
,
left
:
0
,
bottom
:
0
,
right
:
0
)
public
static
var
detailLabelInsetsRef
:
MaterialInsetsType
=
MaterialInsetsToValue
(
.
None
)
public
static
var
detailLabelInsetsRef
:
MaterialInsetsType
=
MaterialInsetsToValue
(
.
None
)
...
@@ -255,7 +200,6 @@ public extension MaterialTheme.flatButton {
...
@@ -255,7 +200,6 @@ public extension MaterialTheme.flatButton {
public
static
var
shadowColor
:
UIColor
=
MaterialColor
.
black
public
static
var
shadowColor
:
UIColor
=
MaterialColor
.
black
// shape
// shape
public
static
var
masksToBounds
:
Bool
=
false
public
static
var
cornerRadius
:
MaterialRadius
=
.
Radius1
public
static
var
cornerRadius
:
MaterialRadius
=
.
Radius1
public
static
var
contentInsets
:
MaterialInsets
=
.
Rectangle3
public
static
var
contentInsets
:
MaterialInsets
=
.
Rectangle3
public
static
var
shape
:
MaterialShape
=
.
None
public
static
var
shape
:
MaterialShape
=
.
None
...
@@ -287,7 +231,6 @@ public extension MaterialTheme.raisedButton {
...
@@ -287,7 +231,6 @@ public extension MaterialTheme.raisedButton {
public
static
var
shadowColor
:
UIColor
=
MaterialColor
.
black
public
static
var
shadowColor
:
UIColor
=
MaterialColor
.
black
// shape
// shape
public
static
var
masksToBounds
:
Bool
=
false
public
static
var
cornerRadius
:
MaterialRadius
=
.
Radius1
public
static
var
cornerRadius
:
MaterialRadius
=
.
Radius1
public
static
var
contentInsets
:
MaterialInsets
=
.
Rectangle2
public
static
var
contentInsets
:
MaterialInsets
=
.
Rectangle2
public
static
var
shape
:
MaterialShape
=
.
None
public
static
var
shape
:
MaterialShape
=
.
None
...
@@ -320,8 +263,6 @@ public extension MaterialTheme.fabButton {
...
@@ -320,8 +263,6 @@ public extension MaterialTheme.fabButton {
public
static
var
shadowColor
:
UIColor
=
MaterialColor
.
black
public
static
var
shadowColor
:
UIColor
=
MaterialColor
.
black
// shape
// shape
public
static
var
masksToBounds
:
Bool
=
false
public
static
var
cornerRadius
:
MaterialRadius
=
.
None
public
static
var
contentInsets
:
MaterialInsets
=
.
None
public
static
var
contentInsets
:
MaterialInsets
=
.
None
public
static
var
shape
:
MaterialShape
=
.
Circle
public
static
var
shape
:
MaterialShape
=
.
Circle
...
...
Source/MaterialView.swift
View file @
5bf2f0a9
...
@@ -210,7 +210,7 @@ public class MaterialView : UIView {
...
@@ -210,7 +210,7 @@ public class MaterialView : UIView {
/**
/**
:name: cornerRadius
:name: cornerRadius
*/
*/
public
var
cornerRadius
:
MaterialRadius
?
{
public
var
cornerRadius
:
MaterialRadius
{
didSet
{
didSet
{
if
let
v
:
MaterialRadius
=
cornerRadius
{
if
let
v
:
MaterialRadius
=
cornerRadius
{
layer
.
cornerRadius
=
MaterialRadiusToValue
(
v
)
layer
.
cornerRadius
=
MaterialRadiusToValue
(
v
)
...
@@ -289,6 +289,7 @@ public class MaterialView : UIView {
...
@@ -289,6 +289,7 @@ public class MaterialView : UIView {
borderWidth
=
MaterialTheme
.
view
.
borderWidth
borderWidth
=
MaterialTheme
.
view
.
borderWidth
shadowDepth
=
.
None
shadowDepth
=
.
None
shape
=
.
None
shape
=
.
None
cornerRadius
=
.
None
super
.
init
(
coder
:
aDecoder
)
super
.
init
(
coder
:
aDecoder
)
}
}
...
@@ -303,6 +304,7 @@ public class MaterialView : UIView {
...
@@ -303,6 +304,7 @@ public class MaterialView : UIView {
borderWidth
=
MaterialTheme
.
view
.
borderWidth
borderWidth
=
MaterialTheme
.
view
.
borderWidth
shadowDepth
=
.
None
shadowDepth
=
.
None
shape
=
.
None
shape
=
.
None
cornerRadius
=
.
None
super
.
init
(
frame
:
frame
)
super
.
init
(
frame
:
frame
)
prepareView
()
prepareView
()
}
}
...
@@ -315,15 +317,14 @@ public class MaterialView : UIView {
...
@@ -315,15 +317,14 @@ public class MaterialView : UIView {
}
}
/**
/**
:name: layoutSub
views
:name: layoutSub
layersOfLayer
*/
*/
public
override
func
layoutSubviews
()
{
public
override
func
layoutSublayersOfLayer
(
layer
:
CALayer
)
{
super
.
layoutSubviews
()
super
.
layoutSublayersOfLayer
(
layer
)
prepareShape
()
if
self
.
layer
==
layer
{
prepareShape
()
visualLayer
.
frame
=
bounds
prepareVisualLayer
()
visualLayer
.
position
=
CGPointMake
(
width
/
2
,
height
/
2
)
}
visualLayer
.
cornerRadius
=
layer
.
cornerRadius
}
}
/**
/**
...
@@ -374,6 +375,7 @@ public class MaterialView : UIView {
...
@@ -374,6 +375,7 @@ public class MaterialView : UIView {
animationDidStop
(
x
,
finished
:
true
)
animationDidStop
(
x
,
finished
:
true
)
}
}
}
}
prepareVisualLayer
()
}
}
//
//
...
@@ -386,8 +388,6 @@ public class MaterialView : UIView {
...
@@ -386,8 +388,6 @@ public class MaterialView : UIView {
shadowDepth
=
MaterialTheme
.
view
.
shadowDepth
shadowDepth
=
MaterialTheme
.
view
.
shadowDepth
shadowColor
=
MaterialTheme
.
view
.
shadowColor
shadowColor
=
MaterialTheme
.
view
.
shadowColor
zPosition
=
MaterialTheme
.
view
.
zPosition
zPosition
=
MaterialTheme
.
view
.
zPosition
masksToBounds
=
MaterialTheme
.
view
.
masksToBounds
cornerRadius
=
MaterialTheme
.
view
.
cornerRadius
borderColor
=
MaterialTheme
.
view
.
bordercolor
borderColor
=
MaterialTheme
.
view
.
bordercolor
// visualLayer
// visualLayer
...
@@ -404,4 +404,13 @@ public class MaterialView : UIView {
...
@@ -404,4 +404,13 @@ public class MaterialView : UIView {
layer
.
cornerRadius
=
width
/
2
layer
.
cornerRadius
=
width
/
2
}
}
}
}
//
// :name: prepareVisualLayer
//
internal
func
prepareVisualLayer
()
{
visualLayer
.
frame
=
bounds
visualLayer
.
position
=
CGPointMake
(
width
/
2
,
height
/
2
)
visualLayer
.
cornerRadius
=
layer
.
cornerRadius
}
}
}
Source/NavigationBarView.swift
View file @
5bf2f0a9
...
@@ -220,8 +220,6 @@ public class NavigationBarView : MaterialView {
...
@@ -220,8 +220,6 @@ public class NavigationBarView : MaterialView {
shadowDepth
=
MaterialTheme
.
navigationBarView
.
shadowDepth
shadowDepth
=
MaterialTheme
.
navigationBarView
.
shadowDepth
shadowColor
=
MaterialTheme
.
navigationBarView
.
shadowColor
shadowColor
=
MaterialTheme
.
navigationBarView
.
shadowColor
zPosition
=
MaterialTheme
.
navigationBarView
.
zPosition
zPosition
=
MaterialTheme
.
navigationBarView
.
zPosition
masksToBounds
=
MaterialTheme
.
navigationBarView
.
masksToBounds
cornerRadius
=
MaterialTheme
.
navigationBarView
.
cornerRadius
borderWidth
=
MaterialTheme
.
navigationBarView
.
borderWidth
borderWidth
=
MaterialTheme
.
navigationBarView
.
borderWidth
borderColor
=
MaterialTheme
.
navigationBarView
.
bordercolor
borderColor
=
MaterialTheme
.
navigationBarView
.
bordercolor
}
}
...
...
Source/RaisedButton.swift
View file @
5bf2f0a9
...
@@ -35,7 +35,6 @@ public class RaisedButton : MaterialButton {
...
@@ -35,7 +35,6 @@ public class RaisedButton : MaterialButton {
shadowDepth
=
MaterialTheme
.
raisedButton
.
shadowDepth
shadowDepth
=
MaterialTheme
.
raisedButton
.
shadowDepth
shadowColor
=
MaterialTheme
.
raisedButton
.
shadowColor
shadowColor
=
MaterialTheme
.
raisedButton
.
shadowColor
zPosition
=
MaterialTheme
.
raisedButton
.
zPosition
zPosition
=
MaterialTheme
.
raisedButton
.
zPosition
masksToBounds
=
MaterialTheme
.
raisedButton
.
masksToBounds
cornerRadius
=
MaterialTheme
.
raisedButton
.
cornerRadius
cornerRadius
=
MaterialTheme
.
raisedButton
.
cornerRadius
borderWidth
=
MaterialTheme
.
raisedButton
.
borderWidth
borderWidth
=
MaterialTheme
.
raisedButton
.
borderWidth
borderColor
=
MaterialTheme
.
raisedButton
.
bordercolor
borderColor
=
MaterialTheme
.
raisedButton
.
bordercolor
...
...
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