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
9243457e
Commit
9243457e
authored
Dec 08, 2015
by
Daniel Dahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update to Material Types
parent
0c9e543e
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
20 additions
and
48 deletions
+20
-48
MaterialKit.xcodeproj/project.pbxproj
+6
-12
Sources/MaterialButton.swift
+3
-3
Sources/MaterialCornerRadius.swift
+4
-4
Sources/MaterialStatusBarStyle.swift
+0
-22
Sources/MaterialTheme.swift
+2
-2
Sources/MaterialView.swift
+3
-3
Sources/NavigationBarView.swift
+2
-2
No files found.
MaterialKit.xcodeproj/project.pbxproj
View file @
9243457e
...
...
@@ -32,9 +32,8 @@
96D88C341C1328D800B91418
/* MaterialLayer.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96D88C0B1C1328D800B91418
/* MaterialLayer.swift */
;
};
96D88C351C1328D800B91418
/* MaterialLayout.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96D88C0C1C1328D800B91418
/* MaterialLayout.swift */
;
};
96D88C361C1328D800B91418
/* MaterialPulseView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96D88C0D1C1328D800B91418
/* MaterialPulseView.swift */
;
};
96D88C371C1328D800B91418
/* Material
Radius.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96D88C0E1C1328D800B91418
/* Material
Radius.swift */
;
};
96D88C371C1328D800B91418
/* Material
CornerRadius.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96D88C0E1C1328D800B91418
/* MaterialCorner
Radius.swift */
;
};
96D88C381C1328D800B91418
/* MaterialShape.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96D88C0F1C1328D800B91418
/* MaterialShape.swift */
;
};
96D88C391C1328D800B91418
/* MaterialStatusBarStyle.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96D88C101C1328D800B91418
/* MaterialStatusBarStyle.swift */
;
};
96D88C3A1C1328D800B91418
/* MaterialTextLayer.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96D88C111C1328D800B91418
/* MaterialTextLayer.swift */
;
};
96D88C3B1C1328D800B91418
/* MaterialTheme.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96D88C121C1328D800B91418
/* MaterialTheme.swift */
;
};
96D88C3C1C1328D800B91418
/* MaterialTransitionAnimation.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96D88C131C1328D800B91418
/* MaterialTransitionAnimation.swift */
;
};
...
...
@@ -52,8 +51,7 @@
96D88C561C132ABF00B91418
/* MaterialTheme.swift in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96D88C121C1328D800B91418
/* MaterialTheme.swift */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
96D88C571C132ABF00B91418
/* CardView.swift in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96D88BF61C1328D800B91418
/* CardView.swift */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
96D88C581C132ABF00B91418
/* ImageCardView.swift in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96D88BFB1C1328D800B91418
/* ImageCardView.swift */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
96D88C591C132ABF00B91418
/* MaterialStatusBarStyle.swift in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96D88C101C1328D800B91418
/* MaterialStatusBarStyle.swift */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
96D88C5A1C132ABF00B91418
/* MaterialRadius.swift in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96D88C0E1C1328D800B91418
/* MaterialRadius.swift */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
96D88C5A1C132ABF00B91418
/* MaterialCornerRadius.swift in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96D88C0E1C1328D800B91418
/* MaterialCornerRadius.swift */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
96D88C5B1C132ABF00B91418
/* MaterialShape.swift in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96D88C0F1C1328D800B91418
/* MaterialShape.swift */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
96D88C5C1C132ABF00B91418
/* MaterialBorder.swift in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96D88C011C1328D800B91418
/* MaterialBorder.swift */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
96D88C5D1C132ABF00B91418
/* MaterialColor.swift in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96D88C031C1328D800B91418
/* MaterialColor.swift */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
...
...
@@ -123,9 +121,8 @@
96D88C0B1C1328D800B91418
/* MaterialLayer.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
MaterialLayer.swift
;
sourceTree
=
"<group>"
;
};
96D88C0C1C1328D800B91418
/* MaterialLayout.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
MaterialLayout.swift
;
sourceTree
=
"<group>"
;
};
96D88C0D1C1328D800B91418
/* MaterialPulseView.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
MaterialPulseView.swift
;
sourceTree
=
"<group>"
;
};
96D88C0E1C1328D800B91418
/* Material
Radius.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
Material
Radius.swift
;
sourceTree
=
"<group>"
;
};
96D88C0E1C1328D800B91418
/* Material
CornerRadius.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
MaterialCorner
Radius.swift
;
sourceTree
=
"<group>"
;
};
96D88C0F1C1328D800B91418
/* MaterialShape.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
MaterialShape.swift
;
sourceTree
=
"<group>"
;
};
96D88C101C1328D800B91418
/* MaterialStatusBarStyle.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
MaterialStatusBarStyle.swift
;
sourceTree
=
"<group>"
;
};
96D88C111C1328D800B91418
/* MaterialTextLayer.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
MaterialTextLayer.swift
;
sourceTree
=
"<group>"
;
};
96D88C121C1328D800B91418
/* MaterialTheme.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
MaterialTheme.swift
;
sourceTree
=
"<group>"
;
};
96D88C131C1328D800B91418
/* MaterialTransitionAnimation.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
MaterialTransitionAnimation.swift
;
sourceTree
=
"<group>"
;
};
...
...
@@ -246,8 +243,7 @@
96D88C4A1C13294200B91418
/* Type */
=
{
isa
=
PBXGroup
;
children
=
(
96D88C101C1328D800B91418
/* MaterialStatusBarStyle.swift */
,
96D88C0E1C1328D800B91418
/* MaterialRadius.swift */
,
96D88C0E1C1328D800B91418
/* MaterialCornerRadius.swift */
,
96D88C0F1C1328D800B91418
/* MaterialShape.swift */
,
96D88C011C1328D800B91418
/* MaterialBorder.swift */
,
96D88C041C1328D800B91418
/* MaterialDepth.swift */
,
...
...
@@ -382,8 +378,7 @@
96D88C561C132ABF00B91418
/* MaterialTheme.swift in Headers */
,
96D88C571C132ABF00B91418
/* CardView.swift in Headers */
,
96D88C581C132ABF00B91418
/* ImageCardView.swift in Headers */
,
96D88C591C132ABF00B91418
/* MaterialStatusBarStyle.swift in Headers */
,
96D88C5A1C132ABF00B91418
/* MaterialRadius.swift in Headers */
,
96D88C5A1C132ABF00B91418
/* MaterialCornerRadius.swift in Headers */
,
96D88C5B1C132ABF00B91418
/* MaterialShape.swift in Headers */
,
96D88C5C1C132ABF00B91418
/* MaterialBorder.swift in Headers */
,
96D88C5D1C132ABF00B91418
/* MaterialColor.swift in Headers */
,
...
...
@@ -505,14 +500,13 @@
96D88C3D1C1328D800B91418
/* MaterialView.swift in Sources */
,
96D88C291C1328D800B91418
/* MaterialBasicAnimation.swift in Sources */
,
96D88C3A1C1328D800B91418
/* MaterialTextLayer.swift in Sources */
,
96D88C371C1328D800B91418
/* MaterialRadius.swift in Sources */
,
96D88C371C1328D800B91418
/* Material
Corner
Radius.swift in Sources */
,
96D88C241C1328D800B91418
/* ImageCardView.swift in Sources */
,
96D88C2B1C1328D800B91418
/* MaterialButton.swift in Sources */
,
96D88C311C1328D800B91418
/* MaterialKeyframeAnimation.swift in Sources */
,
96D88C2E1C1328D800B91418
/* MaterialFont.swift in Sources */
,
96D88C2A1C1328D800B91418
/* MaterialBorder.swift in Sources */
,
96D88C351C1328D800B91418
/* MaterialLayout.swift in Sources */
,
96D88C391C1328D800B91418
/* MaterialStatusBarStyle.swift in Sources */
,
96D88C2F1C1328D800B91418
/* MaterialGravity.swift in Sources */
,
96D88C231C1328D800B91418
/* FlatButton.swift in Sources */
,
96D88C201C1328D800B91418
/* CapturePreviewView.swift in Sources */
,
...
...
Sources/MaterialButton.swift
View file @
9243457e
...
...
@@ -215,10 +215,10 @@ public class MaterialButton : UIButton {
/**
:name: cornerRadius
*/
public
var
cornerRadius
:
MaterialRadius
?
{
public
var
cornerRadius
:
Material
Corner
Radius
?
{
didSet
{
if
let
v
:
MaterialRadius
=
cornerRadius
{
layer
.
cornerRadius
=
MaterialRadiusToValue
(
v
)
if
let
v
:
Material
Corner
Radius
=
cornerRadius
{
layer
.
cornerRadius
=
Material
Corner
RadiusToValue
(
v
)
if
.
Circle
==
shape
{
shape
=
.
None
}
...
...
Sources/MaterialRadius.swift
→
Sources/Material
Corner
Radius.swift
View file @
9243457e
...
...
@@ -18,9 +18,9 @@
import
UIKit
public
typealias
MaterialRadiusType
=
CGFloat
public
typealias
Material
Corner
RadiusType
=
CGFloat
public
enum
MaterialRadius
{
public
enum
Material
Corner
Radius
{
case
None
case
Radius1
case
Radius2
...
...
@@ -29,9 +29,9 @@ public enum MaterialRadius {
}
/**
:name: MaterialRadiusToValue
:name: Material
Corner
RadiusToValue
*/
public
func
Material
RadiusToValue
(
radius
:
MaterialRadius
)
->
Material
RadiusType
{
public
func
Material
CornerRadiusToValue
(
radius
:
MaterialCornerRadius
)
->
MaterialCorner
RadiusType
{
switch
radius
{
case
.
None
:
return
0
...
...
Sources/MaterialStatusBarStyle.swift
deleted
100644 → 0
View file @
0c9e543e
//
// Copyright (C) 2015 CosmicMind, Inc. <http://cosmicmind.io> and other CosmicMind 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/>.
//
public
enum
MaterialStatusBarStyle
:
Int
{
case
Default
case
LightContent
}
Sources/MaterialTheme.swift
View file @
9243457e
...
...
@@ -265,7 +265,7 @@ public extension MaterialTheme.flatButton {
public
static
var
shadowColor
:
UIColor
=
MaterialColor
.
black
// shape
public
static
var
cornerRadius
:
MaterialRadius
=
.
Radius1
public
static
var
cornerRadius
:
Material
Corner
Radius
=
.
Radius1
public
static
var
contentInsets
:
MaterialEdgeInsets
=
.
WideRectangle3
public
static
var
shape
:
MaterialShape
=
.
None
...
...
@@ -296,7 +296,7 @@ public extension MaterialTheme.raisedButton {
public
static
var
shadowColor
:
UIColor
=
MaterialColor
.
black
// shape
public
static
var
cornerRadius
:
MaterialRadius
=
.
Radius1
public
static
var
cornerRadius
:
Material
Corner
Radius
=
.
Radius1
public
static
var
contentInsets
:
MaterialEdgeInsets
=
.
WideRectangle2
public
static
var
shape
:
MaterialShape
=
.
None
...
...
Sources/MaterialView.swift
View file @
9243457e
...
...
@@ -210,10 +210,10 @@ public class MaterialView : UIView {
/**
:name: cornerRadius
*/
public
var
cornerRadius
:
MaterialRadius
{
public
var
cornerRadius
:
Material
Corner
Radius
{
didSet
{
if
let
v
:
MaterialRadius
=
cornerRadius
{
layer
.
cornerRadius
=
MaterialRadiusToValue
(
v
)
if
let
v
:
Material
Corner
Radius
=
cornerRadius
{
layer
.
cornerRadius
=
Material
Corner
RadiusToValue
(
v
)
if
.
Circle
==
shape
{
shape
=
.
None
}
...
...
Sources/NavigationBarView.swift
View file @
9243457e
...
...
@@ -22,9 +22,9 @@ public class NavigationBarView : MaterialView {
/**
:name: statusBarStyle
*/
public
var
statusBarStyle
:
MaterialStatusBarStyle
!
{
public
var
statusBarStyle
:
UIStatusBarStyle
=
UIApplication
.
sharedApplication
()
.
statusBarStyle
{
didSet
{
UIApplication
.
sharedApplication
()
.
s
etStatusBarStyle
(
.
LightContent
==
statusBarStyle
?
.
LightContent
:
.
Default
,
animated
:
true
)
UIApplication
.
sharedApplication
()
.
s
tatusBarStyle
=
statusBarStyle
}
}
...
...
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