1 / 4
文档名称:

iOS内建App的应用(2)—— 调用自定义App.pdf

格式:pdf   页数:4
下载后只包含 1 个 PDF 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

分享

预览

iOS内建App的应用(2)—— 调用自定义App.pdf

上传人:n22x33 2012/8/29 文件大小:0 KB

下载得到文件列表

iOS内建App的应用(2)—— 调用自定义App.pdf

文档介绍

文档介绍:内建 App 的应用(2)——调用自定义 App

在《内建 App 的应用(1)——调用 Email》一文的开头,知道了最原始的方法
是利用 Application 的 openURL:方法调用 App。这里我们将利用它来调用自定义
程序。(这篇文章可以利用模拟器测试了。)

l 新建工程 OutsideApp
l 进入 info 页面:
找一个顺眼的地方添加项:URL types,展开如图

l 修改 URL identifier 为 URL Schemes
l 在 item 0 修改 value 为存在的 App

l 在 OutsideAppAppDelegate 做点标记,让别人调用它时显示切换提示(当然
你在 StoryBoard 还是 Xib 随便加个 Lable 标识都行)
响应 openURL 的方法
-(BOOL)application:(UIApplication *)application openURL:(NSURL
*)url sourceApplication:(NSString *)sourceApplication
annotation:(id)annotation{
UIAlertView *alert=[[UIAlertView alloc]initWithTitle:@"调⽤"
message:@"没错, " delegate:nil cancelButtonTitle:@"
确定" otherButtonTitles: nil];
[alert show];
[alert release];
return YES;
}
l 回到我们的《内建 App 的应用(