我有一个带有打开另一个应用程序的操作(toggleApplication)的按钮。当我从打开的应用程序返回应用程序时,我想转到另一个视图。但我从我的代码中得到以下错误:
接收器(RootViewController:0x1f192450)没有标识符为“showReceipt”的segue
AppDelegate.m
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation {
RootViewController *controller = [RootViewController alloc];
return [controller handleURL:url];
}
根视图控制器.m
- (IBAction)toggleApplication:(id)sender{
// Open application
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:theUrlString]];
}
- (BOOL)handleURL:(NSURL *)url{
[self performSegueWithIdentifier:@"showReceipt" sender:self];
return YES;
}