Skip to content

Instantly share code, notes, and snippets.

@trungtran
Created February 5, 2013 18:23
Show Gist options
  • Save trungtran/4716466 to your computer and use it in GitHub Desktop.
Save trungtran/4716466 to your computer and use it in GitHub Desktop.
// Transition duration between changing content view controllers
// Default: 0.0
@property (nonatomic, assign) NSTimeInterval contentViewControllerAnimationDuration;
// Animation option for setting content view controller
// Default: 0
@property (nonatomic, assign) NSInteger contentViewControllerAnimationOption;
- (void)setContentViewController:(UIViewController *)contentViewController snapToContentViewController:(BOOL)snapToContentViewController animated:(BOOL)animated
{
[self transitionFromViewController:currentContentViewController toViewController:[self contentViewController] duration:[self contentViewControllerAnimationDuration] options:[self contentViewControllerAnimationOption] animations:nil completion:^
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment