我正在尝试通过将 URL 链接到按钮来从 DashboardViewController 打开网页。我有以下代码:
- (IBAction)facebook:(id)sender {
[[DashboardViewController sharedApplication] openURL:[NSURL URLWithString:@"http://www.facebook.com"]];
}
但是,这会引发错误:
[DashboardViewController sharedApplication]: unrecognized selector sent to class 0xaba8
2013-04-22 23:23:35.264 LoginScreen[37692:c07] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[DashboardViewController sharedApplication]: unrecognized selector sent to class 0xaba8'
有人可以帮我吗?