开发者

How to change the UINavigationVIewController when using presentModalViewController

开发者 https://www.devze.com 2023-01-23 18:38 出处:网络
How do I set the modalViewControll to a particular size? UINavigationController *NC = (More stuff); [self presentModelViewController:NC]...;

How do I set the modalViewControll to a particular size?

UINavigationController *NC = (More stuff);

[self presentModelViewController:NC]...;

that code presents my UIViewController as a full screen. I want to to be a smaller window size is that开发者_如何学C possible or do I need to do a popovercontroller?


If you want something other than full screen you can look at setting the modalPresentationStyle property on the UINavigationController you're about to display.

NC.modalPresentationStyle = UIModalPresentationFormSheet;

Look at the documentation to see what styles are available. If you need something different than those styles then you'll have to do it all yourself. If you use a UIPopoverController you have to be prepared for the user to dismiss your popover by simply tapping elsewhere on the screen.


Check out the modalPresentationStyle property of UIViewController.

0

精彩评论

暂无评论...
验证码 换一张
取 消