Display a presentation using modalPresentationStyle

I heard that you can make a popup look like in Mail for iPad using modalPresentationStyle. I find it difficult to understand how to use it. I looked at this post here and still could not figure out how to do this. If anyone could explain how to connect controllers to make this code very useful.

thanks

+4
source share
1 answer

I think the magic spell is this:

myViewController = ..... create your new controller if needed .... myViewController.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal; myViewController.modalPresentationStyle = UIModalPresentationFormSheet; // "self" here is a ViewController instance [self presentModalViewController:myViewController animated:YES] 

I seem to recall that in the portrait the modal captures the screen; in the landscape it will be presented in the spotlight.

+12
source

Source: https://habr.com/ru/post/1307727/


All Articles