标签:
1.在appA的info.plist中定义URL,就是在文件中添加URL types一项。可按下图进行添加
NSURL *url = [NSURL URLWithString:@"myapp:"];
[[UIApplication sharedApplication] openURL:url];
3.打开之后,会调用appA的AppDelegate的
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation {}
4.判断是否能打开应用
[[UIApplication sharedApplication] canOpenURL:[NSURLURLWithString:@"myapp://"]];
标签:
原文地址:http://www.cnblogs.com/gaohe/p/4481257.html