Skip to content

Commit

Permalink
add motionEffect in About
Browse files Browse the repository at this point in the history
  • Loading branch information
nixzhu committed Aug 15, 2016
1 parent f54a7e7 commit b60076d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Yep/Extensions/UIMotionEffect+Yep.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ extension UIInterpolatingMotionEffectType {

extension UIMotionEffect {

class func twoAxesShift(strength: Float) -> UIMotionEffect {
class func yep_twoAxesShift(strength: Float) -> UIMotionEffect {

func motion(type: UIInterpolatingMotionEffectType) -> UIInterpolatingMotionEffect {
let keyPath = type.yep_centerKeyPath
Expand Down
5 changes: 5 additions & 0 deletions Yep/ViewControllers/About/AboutViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ final class AboutViewController: SegueViewController {
appLogoImageViewTopConstraint.constant = Ruler.iPhoneVertical(0, 20, 40, 60).value
appNameLabelTopConstraint.constant = Ruler.iPhoneVertical(10, 20, 20, 20).value

let motionEffect = UIMotionEffect.yep_twoAxesShift(Ruler.iPhoneHorizontal(20, 30, 40).value)
appLogoImageView.addMotionEffect(motionEffect)
appNameLabel.addMotionEffect(motionEffect)
appVersionLabel.addMotionEffect(motionEffect)

appNameLabel.textColor = UIColor.yepTintColor()

if let
Expand Down

0 comments on commit b60076d

Please sign in to comment.