Commit 975085e3 by Daniel Dahan

updated MaterialView example

parent d71736ca
...@@ -28,8 +28,8 @@ class ViewController: UIViewController { ...@@ -28,8 +28,8 @@ class ViewController: UIViewController {
// Uncomment different examples and read // Uncomment different examples and read
// the comments below. // the comments below.
// prepareGeneralCardViewExample() // prepareGeneralCardViewExample()
prepareCardViewWithoutPulseBackgroundImageExample() // prepareCardViewWithoutPulseBackgroundImageExample()
// prepareCardViewWithAlteredAlignmentExample() prepareCardViewWithAlteredAlignmentExample()
// prepareCardViewButtonBarExample() // prepareCardViewButtonBarExample()
} }
......
...@@ -2,15 +2,17 @@ ...@@ -2,15 +2,17 @@
"images" : [ "images" : [
{ {
"idiom" : "universal", "idiom" : "universal",
"filename" : "StarPattern.png", "filename" : "ChakraIcon.png",
"scale" : "1x" "scale" : "1x"
}, },
{ {
"idiom" : "universal", "idiom" : "universal",
"filename" : "ChakraIcon@2x.png",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"idiom" : "universal", "idiom" : "universal",
"filename" : "ChakraIcon@3x.png",
"scale" : "3x" "scale" : "3x"
} }
], ],
......
...@@ -41,9 +41,9 @@ class ViewController: UIViewController { ...@@ -41,9 +41,9 @@ class ViewController: UIViewController {
:description: General usage example. :description: General usage example.
*/ */
private func prepareGeneralMaterialViewExample() { private func prepareGeneralMaterialViewExample() {
let materialView: MaterialView = MaterialView(frame: CGRectMake(132, 132, 150, 150)) let materialView: MaterialView = MaterialView(frame: CGRectMake(7, 100, 400, 400))
materialView.backgroundColor = MaterialColor.blueGrey.darken4 materialView.backgroundColor = MaterialColor.deepPurple.lighten1
materialView.image = UIImage(named: "StarPattern") materialView.image = UIImage(named: "ChakraIcon")
materialView.contentsGravity = .BottomRight materialView.contentsGravity = .BottomRight
materialView.shape = .Square materialView.shape = .Square
materialView.shadowDepth = .Depth2 materialView.shadowDepth = .Depth2
......
...@@ -203,6 +203,7 @@ ...@@ -203,6 +203,7 @@
96D88C4D1C1329BB00B91418 /* Animation */, 96D88C4D1C1329BB00B91418 /* Animation */,
96D88C4C1C1329AC00B91418 /* Theme */, 96D88C4C1C1329AC00B91418 /* Theme */,
96D88C4B1C13296500B91418 /* Card */, 96D88C4B1C13296500B91418 /* Card */,
96DB1C751C14C11B00825BE6 /* Color */,
96D88C4A1C13294200B91418 /* Type */, 96D88C4A1C13294200B91418 /* Type */,
96D88C491C13292700B91418 /* Capture */, 96D88C491C13292700B91418 /* Capture */,
96D88C471C1328F500B91418 /* Font */, 96D88C471C1328F500B91418 /* Font */,
...@@ -249,7 +250,6 @@ ...@@ -249,7 +250,6 @@
96D88C0E1C1328D800B91418 /* MaterialRadius.swift */, 96D88C0E1C1328D800B91418 /* MaterialRadius.swift */,
96D88C0F1C1328D800B91418 /* MaterialShape.swift */, 96D88C0F1C1328D800B91418 /* MaterialShape.swift */,
96D88C011C1328D800B91418 /* MaterialBorder.swift */, 96D88C011C1328D800B91418 /* MaterialBorder.swift */,
96D88C031C1328D800B91418 /* MaterialColor.swift */,
96D88C041C1328D800B91418 /* MaterialDepth.swift */, 96D88C041C1328D800B91418 /* MaterialDepth.swift */,
96D88C061C1328D800B91418 /* MaterialGravity.swift */, 96D88C061C1328D800B91418 /* MaterialGravity.swift */,
96D88C071C1328D800B91418 /* MaterialInsets.swift */, 96D88C071C1328D800B91418 /* MaterialInsets.swift */,
...@@ -347,6 +347,14 @@ ...@@ -347,6 +347,14 @@
name = Navigation; name = Navigation;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
96DB1C751C14C11B00825BE6 /* Color */ = {
isa = PBXGroup;
children = (
96D88C031C1328D800B91418 /* MaterialColor.swift */,
);
name = Color;
sourceTree = "<group>";
};
/* End PBXGroup section */ /* End PBXGroup section */
/* Begin PBXHeadersBuildPhase section */ /* Begin PBXHeadersBuildPhase section */
......
...@@ -28,9 +28,9 @@ MaterialView is the base UIView class used throughout MaterialKit. Like Material ...@@ -28,9 +28,9 @@ MaterialView is the base UIView class used throughout MaterialKit. Like Material
![MaterialKitMaterialView](http://www.materialkit.io/MK/MaterialKitMaterialView.gif) ![MaterialKitMaterialView](http://www.materialkit.io/MK/MaterialKitMaterialView.gif)
```swift ```swift
let materialView: MaterialView = MaterialView(frame: CGRectMake(132, 132, 150, 150)) let materialView: MaterialView = MaterialView(frame: CGRectMake(7, 100, 400, 400))
materialView.backgroundColor = MaterialColor.blueGrey.darken4 materialView.backgroundColor = MaterialColor.deepPurple.lighten1
materialView.image = UIImage(named: "StarPattern") materialView.image = UIImage(named: "ChakraIcon")
materialView.contentsGravity = .BottomRight materialView.contentsGravity = .BottomRight
materialView.shape = .Square materialView.shape = .Square
materialView.shadowDepth = .Depth2 materialView.shadowDepth = .Depth2
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment