Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change the modalPresentationStyle when the modal view controller is already shown?

Tags:

ios

I want to set my UIModalPresentationFormSheet style modal view to become UIModalPresentationFullScreen style sometime,but when it's already shown with UIModalPresentationFormSheet style,it can't goto fullscreen using code"[xx setModalPresentationStyle:UIModalPresentationFullScreen];"

Is there a way to change the present style after a modal view shown? My code like this:

UITableDownload* vc = [[UITableDownload alloc] initWithStyle:UITableViewStylePlain];
UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:vc];
[nav setModalPresentationStyle:UIModalPresentationFormSheet];
[MainAppDelegate mainBrowserViewController] presentModalViewController:nav animated:YES];

...//after shown,sometime I implement following code:
[nav setModalPresentationStyle:UIModalPresentationFullScreen];//(The "nav" object is the same as above code)
//But the change style code takes no effect.
like image 811
doudou Avatar asked Apr 12 '11 07:04

doudou


1 Answers

This is still a question for me in an iOS 7 app and at this point I'm left to conclude that changing the modalPresentationStyle after the transition has occurred just has no effect.

like image 88
Kyle Clegg Avatar answered Nov 15 '22 05:11

Kyle Clegg