How to change the UINavigationVIewController when using presentModalViewController
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.
精彩评论