Skip to content
This repository has been archived by the owner on Nov 21, 2017. It is now read-only.

Commit

Permalink
New Swift syntax and podfile update
Browse files Browse the repository at this point in the history
  • Loading branch information
maxluzuriaga committed Aug 10, 2016
1 parent a6d9d82 commit 9ed11bc
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
10 changes: 5 additions & 5 deletions Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,24 @@ PODS:

DEPENDENCIES:
- MaterialMotionCoreAnimationFamily (from `./`)
- MaterialMotionRuntime (from `git@github.com:material-motion/material-motion-runtime-objc.git`, branch `develop`)
- MaterialMotionRuntime (from `https://github.com/material-motion/material-motion-runtime-objc.git`, branch `develop`)

EXTERNAL SOURCES:
MaterialMotionCoreAnimationFamily:
:path: "./"
MaterialMotionRuntime:
:branch: develop
:git: git@github.com:material-motion/material-motion-runtime-objc.git
:git: https://github.com/material-motion/material-motion-runtime-objc.git

CHECKOUT OPTIONS:
MaterialMotionRuntime:
:commit: 2a43053b22493659cec64c2a49d5d52212ab484f
:git: git@github.com:material-motion/material-motion-runtime-objc.git
:commit: 4efc25cb53c264b78b736277e9d8d3e2afaf9620
:git: https://github.com/material-motion/material-motion-runtime-objc.git

SPEC CHECKSUMS:
MaterialMotionCoreAnimationFamily: 363b6b0343e46950478ab5487a38445cf966de57
MaterialMotionRuntime: 142f75ce2cf2682458aa9631541b8644b653ef34

PODFILE CHECKSUM: 8826d7b38972cc6eee2699702b8c1c5cc4ad1c21
PODFILE CHECKSUM: cbc66909b4f6fa2b61d6bb4ec5bd4ee73becdf43

COCOAPODS: 1.0.1
18 changes: 9 additions & 9 deletions examples/apps/Catalog/Catalog/PopupMenuViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ class PopupMenuViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()

self.view.backgroundColor = UIColor.white()
self.view.backgroundColor = UIColor.white

let width = self.view.frame.width
let height = self.view.frame.height
mainBtn = UIView(frame: CGRect(x: width / 2 - 20, y: height - 70, width: 40, height: 40))
mainBtn?.backgroundColor = .orange()
mainBtn?.backgroundColor = .orange
mainBtn?.layer.cornerRadius = 20
mainBtn?.layer.shadowColor = UIColor.black().cgColor
mainBtn?.layer.shadowColor = UIColor.black.cgColor
mainBtn?.layer.shadowOffset = CGSize(width: 0, height: 2)
mainBtn?.layer.shadowOpacity = 0.3
mainBtn?.layer.shadowRadius = 5
Expand All @@ -57,23 +57,23 @@ class PopupMenuViewController: UIViewController {
additionalBtn1?.bounds = mainBtn!.frame
additionalBtn1?.position = mainBtn!.layer.position
additionalBtn1?.cornerRadius = 20
additionalBtn1?.backgroundColor = UIColor.blue().cgColor
additionalBtn1?.backgroundColor = UIColor.blue.cgColor
additionalBtn1?.opacity = 0
self.view.layer.insertSublayer(additionalBtn1!, below: mainBtn!.layer)

additionalBtn2 = CALayer()
additionalBtn2?.bounds = mainBtn!.frame
additionalBtn2?.position = mainBtn!.layer.position
additionalBtn2?.cornerRadius = 20
additionalBtn2?.backgroundColor = UIColor.blue().cgColor
additionalBtn2?.backgroundColor = UIColor.blue.cgColor
additionalBtn2?.opacity = 0
self.view.layer.insertSublayer(additionalBtn2!, below: mainBtn!.layer)

additionalBtn3 = CALayer()
additionalBtn3?.bounds = mainBtn!.frame
additionalBtn3?.position = mainBtn!.layer.position
additionalBtn3?.cornerRadius = 20
additionalBtn3?.backgroundColor = UIColor.blue().cgColor
additionalBtn3?.backgroundColor = UIColor.blue.cgColor
additionalBtn3?.opacity = 0
self.view.layer.insertSublayer(additionalBtn3!, below: mainBtn!.layer)
}
Expand Down Expand Up @@ -111,8 +111,8 @@ class PopupMenuViewController: UIViewController {
// Main button grey
let greyButton = CABasicAnimation(keyPath: "backgroundColor")

let initialColor: AnyObject = UIColor.orange().cgColor
let endColor: AnyObject = UIColor.lightGray().cgColor
let initialColor: AnyObject = UIColor.orange.cgColor
let endColor: AnyObject = UIColor.lightGray.cgColor

greyButton.fromValue = buttonsShowing ? endColor : initialColor
greyButton.toValue = buttonsShowing ? initialColor : endColor
Expand All @@ -139,7 +139,7 @@ class PopupMenuViewController: UIViewController {
transaction.add(plan: btn3Move, to: additionalBtn3!)
transaction.add(plan: btn3Fade, to: additionalBtn3!)

scheduler.commit(transaction)
scheduler.commit(transaction: transaction)
buttonsShowing = !buttonsShowing
}

Expand Down

0 comments on commit 9ed11bc

Please sign in to comment.