Dev*_*ang 3 iphone cocoa-touch objective-c ipad ios4
我想在我的应用程序中使用UIModalPresentationFormSheet.但我正在使用导航控制器.因此,当我写下面的代码时,它没有回应我.我该怎么办 ?
[self.navigationController pushViewController:controller animated:YES];
Run Code Online (Sandbox Code Playgroud)
尝试这样的事情:
// assume controller is UIViewController.
controller.modalPresentationStyle = UIModalPresentationFormSheet;
Run Code Online (Sandbox Code Playgroud)
然后
[self.navigationController presentModalViewController:controller animated:YES];
Run Code Online (Sandbox Code Playgroud)