0

我的 iPad ViewController.xib 带有一个名为 about us 的按钮。如何将该按钮链接到另一个名为“关于我们”的页面。我创建了一个名为 about.xib 的 XIB 文件。以及如何链接该页面。我也可以链接回主视图控制器。我需要创建另一个 m 或 h 文件吗?

我已经完成了这段代码,但它不起作用。

- (IBAction) About {
    UIViewController * about = [[UIViewController alloc] initWithNibName:@"About" bundle:nil];
    [self.navigationController pushViewController:about animated:YES];
    [about release];
}
4

1 回答 1

0
UIViewController * about = [[UIViewController alloc] initWithNibName:@"About" bundle:nil];
[self presentModalViewController:about animated:YES];
[about release];
于 2011-12-07T17:03:15.460 回答