Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- + (void)showOnViewController:(UIViewController*)parentVC completion:(MYVCCompletionBlock)completion
- {
- MYVC *notificationsViewController
- = [parentVC.storyboard instantiateViewControllerWithIdentifier:NSStringFromClass(self)];
- notificationViewController.completion = completion
- [notificationsViewController willMoveToParentViewController:parentVC];
- [notificationsViewController viewWillAppear:YES];
- // настраиваешь иерархию вью
- // в случае, если откуда угодно - я бы добавлял к window
- [UIView animateWithDuration:
- animations:
- completion:^(BOOL finished)
- {
- [notificationsViewController viewDidAppear:YES];
- [parentVC addChildViewController:self];
- [notificationsViewController didMoveToParentViewController:parentVC];
- }];
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement