, .
1 - PauseViewController . , , Alpha 0 , . .h .m
2 - (UIButtons). , .
, .
- (IBAction)dismiss:(id)sender {
[UIView animateWithDuration:0.3f animations:^{
self.view.alpha = 0.0f;
} completion:^(BOOL finished) {
[self.view removeFromSuperview];
[self removeFromParentViewController];
}];
}
3 - UIStoryboardSegue, segue.
- . ( ) .
-(void)perform{
UIViewController *dst = [self destinationViewController];
UIViewController *src = [self sourceViewController];
[src addChildViewController:dst];
[src.view addSubview:dst.view];
[src.view bringSubviewToFront:dst.view];
CGRect frame;
frame.size.height = src.view.frame.size.height;
frame.size.width = src.view.frame.size.width;
frame.origin.x = src.view.bounds.origin.x;
frame.origin.y = src.view.bounds.origin.y;
dst.view.frame = frame;
[UIView animateWithDuration:0.3f animations:^{
dst.view.alpha = 0.5f;
}];
}
4 - segue, custom segue.
Ta-!
, .