Skip to content

Instantly share code, notes, and snippets.

@hasanadil
Created June 28, 2014 14:26
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 hasanadil/cddabfecc79d08596699 to your computer and use it in GitHub Desktop.
Save hasanadil/cddabfecc79d08596699 to your computer and use it in GitHub Desktop.
/**
Show prefs on top of the map
*/
-(IBAction) tapShowMenu:(id)sender
{
ASMapPrefsViewController* prefsController = [[ASMapPrefsViewController alloc] initWithMap:self.map];
[prefsController setTransitioningDelegate:self];
[prefsController setModalPresentationStyle:UIModalPresentationCustom];
[self presentViewController:prefsController animated:YES completion:NULL];
}
#pragma mark presentation delegate
- (id<UIViewControllerAnimatedTransitioning>)animationControllerForPresentedController:(UIViewController *)presented
presentingController:(UIViewController *)presenting
sourceController:(UIViewController *)source {
ASSlideUpTransitionAnimator *animator = [ASSlideUpTransitionAnimator new];
animator.presenting = YES;
return animator;
}
- (id<UIViewControllerAnimatedTransitioning>)animationControllerForDismissedController:(UIViewController *)dismissed {
return [ASSlideUpTransitionAnimator new];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment