开发者

presentModalViewController not displaying toolbar?

开发者 https://www.devze.com 2023-01-27 18:02 出处:网络
I have a viewcontroller I am trying to display as a UIModalPresentationFormSheet, however it does not show its UIToolbar. How can I make a toolbar show up on it?

I have a viewcontroller I am trying to display as a UIModalPresentationFormSheet, however it does not show its UIToolbar. How can I make a toolbar show up on it?

ConnectionEditViewController * connectionEditViewController = [[ConnectionEditViewController alloc] initWithNibName:@"ConnectionEditViewController" bundle: nil];
connectionEditViewController.modalInPopover = YES;
con开发者_JAVA百科nectionEditViewController.modalPresentationStyle = UIModalPresentationFormSheet;
connectionEditViewController.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;

[self presentModalViewController: connectionEditViewController animated: YES];


Create a UINavigationController instance, set the rootViewController to be your connectionEditViewController, then configure the modal properties for the UINavigationController and present that.

If this is on iPad, it should pop up the view with the Navigation Bar as a grey toolbar at the top. Configure the navigationItem of the connectionEditViewController to configure the nav bar.

0

精彩评论

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