Skip to content

Instantly share code, notes, and snippets.

@jongwonwoo
Last active March 25, 2016 14:45
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 jongwonwoo/2190f743b2acc8eda323 to your computer and use it in GitHub Desktop.
Save jongwonwoo/2190f743b2acc8eda323 to your computer and use it in GitHub Desktop.
func panGestureRecognized(recognizer: UIPanGestureRecognizer) {
if recognizer.state == .Began {
setupContentViewShadow()
originalPoint = CGPointMake(contentViewContainer.center.x - CGRectGetWidth(contentViewContainer.bounds) / 2.0,
contentViewContainer.center.y - CGRectGetHeight(contentViewContainer.bounds) / 2.0)
menuViewContainer.transform = CGAffineTransformIdentity
if (scaleBackgroundImageView) {
backgroundImageView.transform = CGAffineTransformIdentity
backgroundImageView.frame = view.bounds
}
menuViewContainer.frame = view.bounds
setupContentButton()
if endAllEditing {
view.window?.endEditing(true)
}else {
setupUserInteractionForContentButtonAndTargetViewControllerView(true, targetViewControllerViewInteractive: false)
}
didNotifyDelegate = false
}
if recognizer.state == .Changed {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment