App之间跳转
1.给目标APP添加URL Schemes
2.在Info.plist中添加LSApplicationQueriesSchemes(此选项在Xcode7后才有)
如果没有此步骤Xcode出现如下错误
This app is not allowed to query for scheme xxxx
3.编写跳转代码
UIApplication *app = [UIApplication sharedApplication];
// 下面的 your:// your为目标App的Schemes
NSURL *url = [NSURL URLWithString:@"your://"];
if ([app canOpenURL:url]) {
[app openURL:url];
} else {
NSLog(@"打开失败");
}
效果
转载于:https://my.oschina.net/zyboy/blog/617430