Commit a17219d2 by Daniel Dahan

updated example projects

parent 91c97a3b
...@@ -11,6 +11,8 @@ ...@@ -11,6 +11,8 @@
967513CC1C136BB7009F455A /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 967513CB1C136BB7009F455A /* ViewController.swift */; }; 967513CC1C136BB7009F455A /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 967513CB1C136BB7009F455A /* ViewController.swift */; };
967513D11C136BB7009F455A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 967513D01C136BB7009F455A /* Assets.xcassets */; }; 967513D11C136BB7009F455A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 967513D01C136BB7009F455A /* Assets.xcassets */; };
967513D41C136BB7009F455A /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 967513D21C136BB7009F455A /* LaunchScreen.storyboard */; }; 967513D41C136BB7009F455A /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 967513D21C136BB7009F455A /* LaunchScreen.storyboard */; };
968F16DE1C914794008CA3F6 /* Material.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 968F16DD1C914794008CA3F6 /* Material.framework */; };
968F16DF1C914794008CA3F6 /* Material.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 968F16DD1C914794008CA3F6 /* Material.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
/* End PBXBuildFile section */ /* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */ /* Begin PBXCopyFilesBuildPhase section */
...@@ -20,6 +22,7 @@ ...@@ -20,6 +22,7 @@
dstPath = ""; dstPath = "";
dstSubfolderSpec = 10; dstSubfolderSpec = 10;
files = ( files = (
968F16DF1C914794008CA3F6 /* Material.framework in Embed Frameworks */,
); );
name = "Embed Frameworks"; name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
...@@ -33,6 +36,7 @@ ...@@ -33,6 +36,7 @@
967513D01C136BB7009F455A /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; }; 967513D01C136BB7009F455A /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
967513D31C136BB7009F455A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; }; 967513D31C136BB7009F455A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
967513D51C136BB7009F455A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; 967513D51C136BB7009F455A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
968F16DD1C914794008CA3F6 /* Material.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; name = Material.framework; path = "/Users/danieldahan/Library/Developer/Xcode/DerivedData/Material-hbpnflxhoouqxebjcyhbbhqyesjd/Build/Products/Debug-iphoneos/Material.framework"; sourceTree = "<absolute>"; };
/* End PBXFileReference section */ /* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */ /* Begin PBXFrameworksBuildPhase section */
...@@ -40,6 +44,7 @@ ...@@ -40,6 +44,7 @@
isa = PBXFrameworksBuildPhase; isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
968F16DE1C914794008CA3F6 /* Material.framework in Frameworks */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
...@@ -49,6 +54,7 @@ ...@@ -49,6 +54,7 @@
967513BD1C136BB7009F455A = { 967513BD1C136BB7009F455A = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
968F16DD1C914794008CA3F6 /* Material.framework */,
967513C81C136BB7009F455A /* CardView */, 967513C81C136BB7009F455A /* CardView */,
967513C71C136BB7009F455A /* Products */, 967513C71C136BB7009F455A /* Products */,
); );
......
{
"images" : [
{
"idiom" : "universal",
"filename" : "VeganCakeFull.jpg",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
...@@ -31,8 +31,6 @@ ...@@ -31,8 +31,6 @@
<key>UISupportedInterfaceOrientations</key> <key>UISupportedInterfaceOrientations</key>
<array> <array>
<string>UIInterfaceOrientationPortrait</string> <string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string> <string>UIInterfaceOrientationPortraitUpsideDown</string>
</array> </array>
<key>UISupportedInterfaceOrientations~ipad</key> <key>UISupportedInterfaceOrientations~ipad</key>
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
*/ */
/** /**
The following ViewController demonstrates using Grid to make complex layouts. The following UIViewController uses Grid to make complex layouts.
*/ */
import UIKit import UIKit
...@@ -41,15 +41,15 @@ class ViewController: UIViewController { ...@@ -41,15 +41,15 @@ class ViewController: UIViewController {
super.viewDidLoad() super.viewDidLoad()
prepareView() prepareView()
// prepareHorizontalGridViewExample() // prepareHorizontalGridViewExample()
prepareVerticalGridViewExample() // prepareVerticalGridViewExample()
// prepareGridDirectionNoneExample() // prepareGridDirectionNoneExample()
// prepareSmallCardViewExample() prepareSmallCardViewExample()
// prepareMediumCardViewExample() // prepareMediumCardViewExample()
// prepareLargeCardViewExample() // prepareLargeCardViewExample()
} }
/// General preparation statements are placed here. /// General preparation statements.
private func prepareView() { private func prepareView() {
view.backgroundColor = MaterialColor.white view.backgroundColor = MaterialColor.white
} }
...@@ -98,8 +98,6 @@ class ViewController: UIViewController { ...@@ -98,8 +98,6 @@ class ViewController: UIViewController {
view.grid.contentInset.bottom = 100 view.grid.contentInset.bottom = 100
view.grid.views = [btn2, btn1, btn3] view.grid.views = [btn2, btn1, btn3]
btn2.backgroundColor = MaterialColor.blue.darken1
for v in view.grid.views! { for v in view.grid.views! {
print(v.frame) print(v.frame)
} }
...@@ -188,7 +186,7 @@ class ViewController: UIViewController { ...@@ -188,7 +186,7 @@ class ViewController: UIViewController {
cardView.depth = .Depth1 cardView.depth = .Depth1
view.addSubview(cardView) view.addSubview(cardView)
var image: UIImage? = UIImage(named: "VeganCakeFull") var image: UIImage? = UIImage(named: "CosmicMindInverted")
let imageView: MaterialView = MaterialView() let imageView: MaterialView = MaterialView()
imageView.image = image imageView.image = image
imageView.contentsGravityPreset = .ResizeAspectFill imageView.contentsGravityPreset = .ResizeAspectFill
......
...@@ -59,7 +59,7 @@ class ViewController: UIViewController { ...@@ -59,7 +59,7 @@ class ViewController: UIViewController {
let imageCardView: ImageCardView = ImageCardView() let imageCardView: ImageCardView = ImageCardView()
// Image. // Image.
let size: CGSize = CGSizeMake(MaterialDevice.bounds.width - CGFloat(40), 150) let size: CGSize = CGSizeMake(MaterialDevice.width - CGFloat(40), 150)
imageCardView.image = UIImage.imageWithColor(MaterialColor.cyan.darken1, size: size) imageCardView.image = UIImage.imageWithColor(MaterialColor.cyan.darken1, size: size)
// Title label. // Title label.
......
...@@ -41,37 +41,23 @@ class ViewController: UIViewController { ...@@ -41,37 +41,23 @@ class ViewController: UIViewController {
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
prepareView() prepareView()
prepareMaterialLayer()
// Examples of using MaterialLayer.
prepareGeneralMaterialLayerExample()
} }
/** /// General preparation statements.
:name: prepareView
:description: General preparation statements.
*/
private func prepareView() { private func prepareView() {
view.backgroundColor = MaterialColor.white view.backgroundColor = MaterialColor.white
} }
/** /// Prepare the MaterialLayer.
:name: prepareGeneralMaterialLayerExample private func prepareMaterialLayer() {
:description: General usage example.
*/
private func prepareGeneralMaterialLayerExample() {
let diameter: CGFloat = 150 let diameter: CGFloat = 150
let point: CGFloat = MaterialDevice.bounds.width / 2 - diameter / 2 let point: CGFloat = MaterialDevice.width / 2 - diameter / 2
let materialLayer: MaterialLayer = MaterialLayer(frame: CGRectMake(point, point, diameter, diameter)) let materialLayer: MaterialLayer = MaterialLayer(frame: CGRectMake(point, point, diameter, diameter))
materialLayer.shape = .Circle materialLayer.shape = .Circle
materialLayer.image = UIImage(named: "iTunesArtwork")
UIImage.contentsOfURL(NSURL(string: "http://www.cosmicmind.io/CM/iTunesArtwork.png")!) { (image: UIImage?, error: NSError?) in
if let v: UIImage = image {
materialLayer.image = v
} else {
materialLayer.image = UIImage(named: "iTunesArtWork")
}
}
// Add materialLayer to UIViewController. // Add materialLayer to UIViewController.
view.layer.addSublayer(materialLayer) view.layer.addSublayer(materialLayer)
......
...@@ -45,9 +45,7 @@ class ViewController: UIViewController { ...@@ -45,9 +45,7 @@ class ViewController: UIViewController {
prepareAlignToParentVerticallyExample() prepareAlignToParentVerticallyExample()
} }
/// General preparation statements are placed here. /// General preparation statements.
@IBOutlet weak var heightConstraint: NSLayoutConstraint!
@IBOutlet weak var navigationBarViewConstraint: NavigationBarView!
private func prepareView() { private func prepareView() {
view.backgroundColor = MaterialColor.white view.backgroundColor = MaterialColor.white
} }
......
...@@ -51,9 +51,10 @@ class ViewController: UIViewController { ...@@ -51,9 +51,10 @@ class ViewController: UIViewController {
/// Prepares the MaterialPulseView example. /// Prepares the MaterialPulseView example.
private func prepareGeneralMaterialPulseViewExample() { private func prepareGeneralMaterialPulseViewExample() {
let point: CGFloat = (MaterialDevice.bounds.width - 150) / 2 let diameter: CGFloat = 150
let point: CGFloat = (MaterialDevice.width - diameter) / 2
let pulseView: MaterialPulseView = MaterialPulseView(frame: CGRectMake(point, point, 150, 150)) let pulseView: MaterialPulseView = MaterialPulseView(frame: CGRectMake(point, point, diameter, diameter))
pulseView.image = UIImage(named: "Graph") pulseView.image = UIImage(named: "Graph")
pulseView.shape = .Square pulseView.shape = .Square
pulseView.depth = .Depth1 pulseView.depth = .Depth1
...@@ -63,12 +64,12 @@ class ViewController: UIViewController { ...@@ -63,12 +64,12 @@ class ViewController: UIViewController {
view.addSubview(pulseView) view.addSubview(pulseView)
// Trigger the pulse animation. // Trigger the pulse animation.
MaterialAnimation.delay(2) { MaterialAnimation.delay(4) {
pulseView.pulse() pulseView.pulse(CGPointMake(30, 30))
} }
pulseView.animate(MaterialAnimation.animationGroup([ pulseView.animate(MaterialAnimation.animationGroup([
MaterialAnimation.rotate(angle: 45), MaterialAnimation.rotate(rotation: 0.5),
MaterialAnimation.rotateX(rotation: 2), MaterialAnimation.rotateX(rotation: 2),
MaterialAnimation.translateY(200) MaterialAnimation.translateY(200)
], duration: 4)) ], duration: 4))
......
...@@ -52,9 +52,10 @@ class ViewController: UIViewController { ...@@ -52,9 +52,10 @@ class ViewController: UIViewController {
/// Prepare the MaterialView. /// Prepare the MaterialView.
private func prepareGeneralMaterialViewExample() { private func prepareGeneralMaterialViewExample() {
let point: CGFloat = (MaterialDevice.bounds.width - 125) / 2 let diameter: CGFloat = 150
let point: CGFloat = (MaterialDevice.width - diameter) / 2
let materialView: MaterialView = MaterialView(frame: CGRectMake(point, point, 125, 125)) let materialView: MaterialView = MaterialView(frame: CGRectMake(point, point, diameter, diameter))
materialView.image = UIImage(named: "CosmicMind") materialView.image = UIImage(named: "CosmicMind")
materialView.shape = .Circle materialView.shape = .Circle
materialView.depth = .Depth2 materialView.depth = .Depth2
......
...@@ -11,6 +11,8 @@ ...@@ -11,6 +11,8 @@
965C58A51C6A4B5D00CFB4E1 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 965C58A41C6A4B5D00CFB4E1 /* ViewController.swift */; }; 965C58A51C6A4B5D00CFB4E1 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 965C58A41C6A4B5D00CFB4E1 /* ViewController.swift */; };
965C58AA1C6A4B5D00CFB4E1 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 965C58A91C6A4B5D00CFB4E1 /* Assets.xcassets */; }; 965C58AA1C6A4B5D00CFB4E1 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 965C58A91C6A4B5D00CFB4E1 /* Assets.xcassets */; };
965C58AD1C6A4B5D00CFB4E1 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 965C58AB1C6A4B5D00CFB4E1 /* LaunchScreen.storyboard */; }; 965C58AD1C6A4B5D00CFB4E1 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 965C58AB1C6A4B5D00CFB4E1 /* LaunchScreen.storyboard */; };
968F16DB1C9146AE008CA3F6 /* Material.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 968F16DA1C9146AE008CA3F6 /* Material.framework */; };
968F16DC1C9146AE008CA3F6 /* Material.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 968F16DA1C9146AE008CA3F6 /* Material.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
/* End PBXBuildFile section */ /* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */ /* Begin PBXCopyFilesBuildPhase section */
...@@ -20,6 +22,7 @@ ...@@ -20,6 +22,7 @@
dstPath = ""; dstPath = "";
dstSubfolderSpec = 10; dstSubfolderSpec = 10;
files = ( files = (
968F16DC1C9146AE008CA3F6 /* Material.framework in Embed Frameworks */,
); );
name = "Embed Frameworks"; name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
...@@ -33,6 +36,7 @@ ...@@ -33,6 +36,7 @@
965C58A91C6A4B5D00CFB4E1 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; }; 965C58A91C6A4B5D00CFB4E1 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
965C58AC1C6A4B5D00CFB4E1 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; }; 965C58AC1C6A4B5D00CFB4E1 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
965C58AE1C6A4B5D00CFB4E1 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; 965C58AE1C6A4B5D00CFB4E1 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
968F16DA1C9146AE008CA3F6 /* Material.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; name = Material.framework; path = "/Users/danieldahan/Library/Developer/Xcode/DerivedData/Material-hbpnflxhoouqxebjcyhbbhqyesjd/Build/Products/Debug-iphoneos/Material.framework"; sourceTree = "<absolute>"; };
/* End PBXFileReference section */ /* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */ /* Begin PBXFrameworksBuildPhase section */
...@@ -40,6 +44,7 @@ ...@@ -40,6 +44,7 @@
isa = PBXFrameworksBuildPhase; isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
968F16DB1C9146AE008CA3F6 /* Material.framework in Frameworks */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
...@@ -49,6 +54,7 @@ ...@@ -49,6 +54,7 @@
965C58961C6A4B5D00CFB4E1 = { 965C58961C6A4B5D00CFB4E1 = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
968F16DA1C9146AE008CA3F6 /* Material.framework */,
965C58A11C6A4B5D00CFB4E1 /* Menu */, 965C58A11C6A4B5D00CFB4E1 /* Menu */,
965C58A01C6A4B5D00CFB4E1 /* Products */, 965C58A01C6A4B5D00CFB4E1 /* Products */,
); );
......
...@@ -14,6 +14,8 @@ ...@@ -14,6 +14,8 @@
9663F9151C7A6AC400AF0965 /* YellowViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9663F9141C7A6AC400AF0965 /* YellowViewController.swift */; }; 9663F9151C7A6AC400AF0965 /* YellowViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9663F9141C7A6AC400AF0965 /* YellowViewController.swift */; };
9663F9171C7A6AD100AF0965 /* GreenViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9663F9161C7A6AD100AF0965 /* GreenViewController.swift */; }; 9663F9171C7A6AD100AF0965 /* GreenViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9663F9161C7A6AD100AF0965 /* GreenViewController.swift */; };
9663F9191C7A6ADB00AF0965 /* BlueViewcontroller.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9663F9181C7A6ADB00AF0965 /* BlueViewcontroller.swift */; }; 9663F9191C7A6ADB00AF0965 /* BlueViewcontroller.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9663F9181C7A6ADB00AF0965 /* BlueViewcontroller.swift */; };
968F16CF1C914422008CA3F6 /* Material.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 968F16CE1C914422008CA3F6 /* Material.framework */; };
968F16D01C914422008CA3F6 /* Material.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 968F16CE1C914422008CA3F6 /* Material.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
/* End PBXBuildFile section */ /* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */ /* Begin PBXCopyFilesBuildPhase section */
...@@ -23,6 +25,7 @@ ...@@ -23,6 +25,7 @@
dstPath = ""; dstPath = "";
dstSubfolderSpec = 10; dstSubfolderSpec = 10;
files = ( files = (
968F16D01C914422008CA3F6 /* Material.framework in Embed Frameworks */,
); );
name = "Embed Frameworks"; name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
...@@ -39,6 +42,7 @@ ...@@ -39,6 +42,7 @@
9663F9141C7A6AC400AF0965 /* YellowViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YellowViewController.swift; sourceTree = "<group>"; }; 9663F9141C7A6AC400AF0965 /* YellowViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YellowViewController.swift; sourceTree = "<group>"; };
9663F9161C7A6AD100AF0965 /* GreenViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GreenViewController.swift; sourceTree = "<group>"; }; 9663F9161C7A6AD100AF0965 /* GreenViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GreenViewController.swift; sourceTree = "<group>"; };
9663F9181C7A6ADB00AF0965 /* BlueViewcontroller.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BlueViewcontroller.swift; sourceTree = "<group>"; }; 9663F9181C7A6ADB00AF0965 /* BlueViewcontroller.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BlueViewcontroller.swift; sourceTree = "<group>"; };
968F16CE1C914422008CA3F6 /* Material.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; name = Material.framework; path = "/Users/danieldahan/Library/Developer/Xcode/DerivedData/Material-hbpnflxhoouqxebjcyhbbhqyesjd/Build/Products/Debug-iphoneos/Material.framework"; sourceTree = "<absolute>"; };
/* End PBXFileReference section */ /* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */ /* Begin PBXFrameworksBuildPhase section */
...@@ -46,6 +50,7 @@ ...@@ -46,6 +50,7 @@
isa = PBXFrameworksBuildPhase; isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
968F16CF1C914422008CA3F6 /* Material.framework in Frameworks */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
...@@ -55,6 +60,7 @@ ...@@ -55,6 +60,7 @@
9663F8F61C7A67FF00AF0965 = { 9663F8F61C7A67FF00AF0965 = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
968F16CE1C914422008CA3F6 /* Material.framework */,
9663F9011C7A67FF00AF0965 /* MenuViewController */, 9663F9011C7A67FF00AF0965 /* MenuViewController */,
9663F9001C7A67FF00AF0965 /* Products */, 9663F9001C7A67FF00AF0965 /* Products */,
); );
......
...@@ -73,9 +73,9 @@ class AppMenuViewController: MenuViewController { ...@@ -73,9 +73,9 @@ class AppMenuViewController: MenuViewController {
/// Loads the YellowViewController into the menuViewControllers mainViewController. /// Loads the YellowViewController into the menuViewControllers mainViewController.
func handleYellowButton() { func handleYellowButton() {
if (mainViewController as? NavigationBarViewController)?.mainViewController is YellowViewController { // if (mainViewController as? NavigationBarViewController)?.mainViewController is YellowViewController {
return // return
} // }
closeMenu { [weak self] in closeMenu { [weak self] in
self?.transitionFromMainViewController(YellowViewController(), options: [.TransitionCrossDissolve]) self?.transitionFromMainViewController(YellowViewController(), options: [.TransitionCrossDissolve])
......
...@@ -7,6 +7,8 @@ ...@@ -7,6 +7,8 @@
objects = { objects = {
/* Begin PBXBuildFile section */ /* Begin PBXBuildFile section */
968F16E11C9147C7008CA3F6 /* Material.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 968F16E01C9147C7008CA3F6 /* Material.framework */; };
968F16E21C9147C7008CA3F6 /* Material.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 968F16E01C9147C7008CA3F6 /* Material.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
96A71E6C1C6FA6D500C0C4AE /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96A71E6B1C6FA6D500C0C4AE /* AppDelegate.swift */; }; 96A71E6C1C6FA6D500C0C4AE /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96A71E6B1C6FA6D500C0C4AE /* AppDelegate.swift */; };
96A71E6E1C6FA6D500C0C4AE /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96A71E6D1C6FA6D500C0C4AE /* ViewController.swift */; }; 96A71E6E1C6FA6D500C0C4AE /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96A71E6D1C6FA6D500C0C4AE /* ViewController.swift */; };
96A71E731C6FA6D500C0C4AE /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 96A71E721C6FA6D500C0C4AE /* Assets.xcassets */; }; 96A71E731C6FA6D500C0C4AE /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 96A71E721C6FA6D500C0C4AE /* Assets.xcassets */; };
...@@ -20,6 +22,7 @@ ...@@ -20,6 +22,7 @@
dstPath = ""; dstPath = "";
dstSubfolderSpec = 10; dstSubfolderSpec = 10;
files = ( files = (
968F16E21C9147C7008CA3F6 /* Material.framework in Embed Frameworks */,
); );
name = "Embed Frameworks"; name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
...@@ -27,6 +30,7 @@ ...@@ -27,6 +30,7 @@
/* End PBXCopyFilesBuildPhase section */ /* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */ /* Begin PBXFileReference section */
968F16E01C9147C7008CA3F6 /* Material.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; name = Material.framework; path = "/Users/danieldahan/Library/Developer/Xcode/DerivedData/Material-hbpnflxhoouqxebjcyhbbhqyesjd/Build/Products/Debug-iphoneos/Material.framework"; sourceTree = "<absolute>"; };
96A71E681C6FA6D500C0C4AE /* TableCardView.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TableCardView.app; sourceTree = BUILT_PRODUCTS_DIR; }; 96A71E681C6FA6D500C0C4AE /* TableCardView.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TableCardView.app; sourceTree = BUILT_PRODUCTS_DIR; };
96A71E6B1C6FA6D500C0C4AE /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; }; 96A71E6B1C6FA6D500C0C4AE /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
96A71E6D1C6FA6D500C0C4AE /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; }; 96A71E6D1C6FA6D500C0C4AE /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
...@@ -40,6 +44,7 @@ ...@@ -40,6 +44,7 @@
isa = PBXFrameworksBuildPhase; isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
968F16E11C9147C7008CA3F6 /* Material.framework in Frameworks */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
...@@ -49,6 +54,7 @@ ...@@ -49,6 +54,7 @@
96A71E5F1C6FA6D500C0C4AE = { 96A71E5F1C6FA6D500C0C4AE = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
968F16E01C9147C7008CA3F6 /* Material.framework */,
96A71E6A1C6FA6D500C0C4AE /* TableCardView */, 96A71E6A1C6FA6D500C0C4AE /* TableCardView */,
96A71E691C6FA6D500C0C4AE /* Products */, 96A71E691C6FA6D500C0C4AE /* Products */,
); );
......
...@@ -11,6 +11,8 @@ ...@@ -11,6 +11,8 @@
960590221C388FD800691E88 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 960590211C388FD800691E88 /* ViewController.swift */; }; 960590221C388FD800691E88 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 960590211C388FD800691E88 /* ViewController.swift */; };
960590271C388FD800691E88 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 960590261C388FD800691E88 /* Assets.xcassets */; }; 960590271C388FD800691E88 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 960590261C388FD800691E88 /* Assets.xcassets */; };
9605902A1C388FD800691E88 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 960590281C388FD800691E88 /* LaunchScreen.storyboard */; }; 9605902A1C388FD800691E88 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 960590281C388FD800691E88 /* LaunchScreen.storyboard */; };
968F16D21C914484008CA3F6 /* Material.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 968F16D11C914484008CA3F6 /* Material.framework */; };
968F16D31C914484008CA3F6 /* Material.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 968F16D11C914484008CA3F6 /* Material.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
/* End PBXBuildFile section */ /* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */ /* Begin PBXCopyFilesBuildPhase section */
...@@ -20,6 +22,7 @@ ...@@ -20,6 +22,7 @@
dstPath = ""; dstPath = "";
dstSubfolderSpec = 10; dstSubfolderSpec = 10;
files = ( files = (
968F16D31C914484008CA3F6 /* Material.framework in Embed Frameworks */,
); );
name = "Embed Frameworks"; name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
...@@ -33,6 +36,7 @@ ...@@ -33,6 +36,7 @@
960590261C388FD800691E88 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; }; 960590261C388FD800691E88 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
960590291C388FD800691E88 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; }; 960590291C388FD800691E88 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
9605902B1C388FD800691E88 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; 9605902B1C388FD800691E88 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
968F16D11C914484008CA3F6 /* Material.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; name = Material.framework; path = "/Users/danieldahan/Library/Developer/Xcode/DerivedData/Material-hbpnflxhoouqxebjcyhbbhqyesjd/Build/Products/Debug-iphoneos/Material.framework"; sourceTree = "<absolute>"; };
/* End PBXFileReference section */ /* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */ /* Begin PBXFrameworksBuildPhase section */
...@@ -40,6 +44,7 @@ ...@@ -40,6 +44,7 @@
isa = PBXFrameworksBuildPhase; isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
968F16D21C914484008CA3F6 /* Material.framework in Frameworks */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
...@@ -49,6 +54,7 @@ ...@@ -49,6 +54,7 @@
960590131C388FD800691E88 = { 960590131C388FD800691E88 = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
968F16D11C914484008CA3F6 /* Material.framework */,
9605901E1C388FD800691E88 /* TextView */, 9605901E1C388FD800691E88 /* TextView */,
9605901D1C388FD800691E88 /* Products */, 9605901D1C388FD800691E88 /* Products */,
); );
......
...@@ -508,7 +508,7 @@ public class MaterialButton : UIButton { ...@@ -508,7 +508,7 @@ public class MaterialButton : UIButton {
let d: CGFloat = 2 * f let d: CGFloat = 2 * f
let s: CGFloat = 1.05 let s: CGFloat = 1.05
var t: CFTimeInterval = CFTimeInterval(1.5 * width / MaterialDevice.bounds.width) var t: CFTimeInterval = CFTimeInterval(1.5 * width / MaterialDevice.width)
if 0.55 < t || 0.25 > t { if 0.55 < t || 0.25 > t {
t = 0.55 t = 0.55
} }
...@@ -551,7 +551,7 @@ public class MaterialButton : UIButton { ...@@ -551,7 +551,7 @@ public class MaterialButton : UIButton {
/// Executes the shrink animation for the pulse effect. /// Executes the shrink animation for the pulse effect.
internal func shrinkAnimation() { internal func shrinkAnimation() {
if pulseScale { if pulseScale {
var t: CFTimeInterval = CFTimeInterval(1.5 * width / MaterialDevice.bounds.width) var t: CFTimeInterval = CFTimeInterval(1.5 * width / MaterialDevice.width)
if 0.55 < t || 0.25 > t { if 0.55 < t || 0.25 > t {
t = 0.55 t = 0.55
} }
......
...@@ -614,7 +614,7 @@ public class MaterialCollectionViewCell : UICollectionViewCell { ...@@ -614,7 +614,7 @@ public class MaterialCollectionViewCell : UICollectionViewCell {
let d: CGFloat = 2 * f let d: CGFloat = 2 * f
let s: CGFloat = 1.05 let s: CGFloat = 1.05
var t: CFTimeInterval = CFTimeInterval(1.5 * width / MaterialDevice.bounds.width) var t: CFTimeInterval = CFTimeInterval(1.5 * width / MaterialDevice.width)
if 0.55 < t || 0.25 > t { if 0.55 < t || 0.25 > t {
t = 0.55 t = 0.55
} }
...@@ -657,7 +657,7 @@ public class MaterialCollectionViewCell : UICollectionViewCell { ...@@ -657,7 +657,7 @@ public class MaterialCollectionViewCell : UICollectionViewCell {
/// Executes the shrink animation for the pulse effect. /// Executes the shrink animation for the pulse effect.
internal func shrinkAnimation() { internal func shrinkAnimation() {
if pulseScale { if pulseScale {
var t: CFTimeInterval = CFTimeInterval(1.5 * width / MaterialDevice.bounds.width) var t: CFTimeInterval = CFTimeInterval(1.5 * width / MaterialDevice.width)
if 0.55 < t || 0.25 > t { if 0.55 < t || 0.25 > t {
t = 0.55 t = 0.55
} }
......
...@@ -256,7 +256,6 @@ public class MaterialLayer : CAShapeLayer { ...@@ -256,7 +256,6 @@ public class MaterialLayer : CAShapeLayer {
public override init(layer: AnyObject) { public override init(layer: AnyObject) {
contentsGravityPreset = .ResizeAspectFill contentsGravityPreset = .ResizeAspectFill
super.init() super.init()
prepareVisualLayer()
} }
/// A convenience initializer. /// A convenience initializer.
......
...@@ -116,7 +116,7 @@ public class MaterialPulseView : MaterialView { ...@@ -116,7 +116,7 @@ public class MaterialPulseView : MaterialView {
let d: CGFloat = 2 * f let d: CGFloat = 2 * f
let s: CGFloat = 1.05 let s: CGFloat = 1.05
var t: CFTimeInterval = CFTimeInterval(1.5 * width / MaterialDevice.bounds.width) var t: CFTimeInterval = CFTimeInterval(1.5 * width / MaterialDevice.width)
if 0.55 < t || 0.25 > t { if 0.55 < t || 0.25 > t {
t = 0.55 t = 0.55
} }
...@@ -159,7 +159,7 @@ public class MaterialPulseView : MaterialView { ...@@ -159,7 +159,7 @@ public class MaterialPulseView : MaterialView {
/// Executes the shrink animation for the pulse effect. /// Executes the shrink animation for the pulse effect.
internal func shrinkAnimation() { internal func shrinkAnimation() {
if pulseScale { if pulseScale {
var t: CFTimeInterval = CFTimeInterval(1.5 * width / MaterialDevice.bounds.width) var t: CFTimeInterval = CFTimeInterval(1.5 * width / MaterialDevice.width)
if 0.55 < t || 0.25 > t { if 0.55 < t || 0.25 > t {
t = 0.55 t = 0.55
} }
......
...@@ -458,7 +458,7 @@ public class MaterialTableViewCell: UITableViewCell { ...@@ -458,7 +458,7 @@ public class MaterialTableViewCell: UITableViewCell {
let d: CGFloat = 2 * f let d: CGFloat = 2 * f
let s: CGFloat = 1.05 let s: CGFloat = 1.05
var t: CFTimeInterval = CFTimeInterval(1.5 * width / MaterialDevice.bounds.width) var t: CFTimeInterval = CFTimeInterval(1.5 * width / MaterialDevice.width)
if 0.55 < t || 0.25 > t { if 0.55 < t || 0.25 > t {
t = 0.55 t = 0.55
} }
...@@ -501,7 +501,7 @@ public class MaterialTableViewCell: UITableViewCell { ...@@ -501,7 +501,7 @@ public class MaterialTableViewCell: UITableViewCell {
/// Executes the shrink animation for the pulse effect. /// Executes the shrink animation for the pulse effect.
internal func shrinkAnimation() { internal func shrinkAnimation() {
if pulseScale { if pulseScale {
var t: CFTimeInterval = CFTimeInterval(1.5 * width / MaterialDevice.bounds.width) var t: CFTimeInterval = CFTimeInterval(1.5 * width / MaterialDevice.width)
if 0.55 < t || 0.25 > t { if 0.55 < t || 0.25 > t {
t = 0.55 t = 0.55
} }
......
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