Skip to content

Instantly share code, notes, and snippets.

@saiday
Last active November 19, 2015 09:47
Show Gist options
  • Select an option

  • Save saiday/6b6bfb37a5f83e6a1599 to your computer and use it in GitHub Desktop.

Select an option

Save saiday/6b6bfb37a5f83e6a1599 to your computer and use it in GitHub Desktop.
ExistViewController
- (void)viewDidLoad
{
[super viewDidLoad];
self.presentInteractor = [[MiniToLargeViewInteractive alloc] init];
[self.presentInteractor attachToViewController:self withView:self.miniView presentViewController:self.playerView];
self.dismissInteractor = [[MiniToLargeViewInteractive alloc] init];
[self.dismissInteractor attachToViewController:self.nextViewController withView:self.nextViewController.view presentViewController:nil];
}
- (id<UIViewControllerInteractiveTransitioning>)interactionControllerForPresentation:(id<UIViewControllerAnimatedTransitioning>)animator
{
if (!self.disableInteractivePlayerTransitioning) {
return self.presentInteractor;
}
return nil;
}
- (id<UIViewControllerInteractiveTransitioning>)interactionControllerForDismissal:(id<UIViewControllerAnimatedTransitioning>)animator
{
if (!self.disableInteractivePlayerTransitioning) {
return self.dismissInteractor;
}
return nil;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment