How do you launch a second MainWindow.xib in an iPad application?

浪子不回头ぞ 提交于 2019-12-03 21:30:00

You load the nib, most likely using NSBundle, and then call makeKeyAndVisible on the window in the nib. The best way to get the window is to use an outlet in the object loading the nib.

[[NSBundle mainBundle] loadNibNamed:@"SecondWindow" owner:self options:nil];
[self.secondWindow makeKeyAndVisible]; //assuming the window was connected to a property named secondWindow

Usually you don't. Instead, you transition to the new top level modal view controller (either in a xib or programmatically created) that would have been in your second MainWindow.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!