iOS:如何通过按下按钮将 mainViewController.XIB 链接到另一个名为 about.XIB 的页面?
我的 iPad ViewController.xib 上有一个名为“关于我们”的按钮。如何将该按钮链接到另一个名为“关于我们”的页面。我创建了一个名为 about.xib 的 XIB 文件。我如何链接该页面。我也可以链接回主视图控制器。我需要创建另一个 m 或 h 文件吗?
我已经完成了这段代码,但它不起作用。
- (IBAction) About {
UIViewController * about = [[UIViewController alloc] initWithNibName:@"About" bundle:nil];
[self.navigationController pushViewController:about animated:YES];
[about release];
}
I have my iPad ViewController.xib with a button called about us. How to link that button to another page called about us. I have created one XIB file called about.xib. And how do i link that page. Also can I link back to the main viewController. Do i need to create another m or h files?
I have done this code but it doesn't work.
- (IBAction) About {
UIViewController * about = [[UIViewController alloc] initWithNibName:@"About" bundle:nil];
[self.navigationController pushViewController:about animated:YES];
[about release];
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)