在我的应用程序中,它基于一个tabbar视图控制器,每个tabbar项目有许多uinavigationviewcontrollers,我想在某个时候(在应用程序启动时)调用presentModalViewController,它包含一个uinavigationcontroller作为root,这样用户可以做一些事情......当他或她完成时,可以点击右上角的完成按钮以关闭模态视图控制器,然后返回到基本标签栏视图....如何使用Interface Builder?
In XCode, create a new View XIB file and open it in Interface Builder. In this xib file, delete the View and drag a UINavigationController into it's place.
Then, in your view controller code, something like
UINavigationController *controller = [[UINavigationController alloc] initWithNibName:@"ModalViewController" bundle:nil];
[self presentModalViewController:controller animated:YES];
[controller release];
Will load your XIB and present it.
Hope this helps, any other questions don't hesitate to comment on this answer!
S
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.