Skip to content

Instantly share code, notes, and snippets.

@andrewdolce
Last active March 17, 2016 01:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrewdolce/daead2c71ad86917c3fe to your computer and use it in GitHub Desktop.
Save andrewdolce/daead2c71ad86917c3fe to your computer and use it in GitHub Desktop.
Social Tunes Sharer Code Sample: CGAffineTransform
// From Paul’s code
func titleButtonWasPressed() {
//slide over.
underButtonView.transform = CGAffineTransformMakeTranslation(CGRectGetWidth(bounds), 0)
UIView.animateWithDuration(0.5) { () -> Void in
self.titleButton.transform = CGAffineTransformMakeTranslation(-CGRectGetWidth(self.bounds), 0)
self.underButtonView.transform = CGAffineTransformIdentity
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment