如何从iphone中的另一个应用程序运行一个应用程序? [英] How can I run one app from another app in iphone?

查看:113
本文介绍了如何从iphone中的另一个应用程序运行一个应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在某些应用上,我看到当一个链接被触摸时,使用safari进行打开链接并从当前应用退出。
我想使用此功能从其他应用程序运行消息应用程序。我可以这样做吗?如果是,怎么可以?

On some app , I see when one link touched , use safari for open link and quit from current app. I want use from this feature for run messages app from other app. Can I do this? If yes, how can?

推荐答案

你需要使用 - [UIApplication openURL:]。例如,您可以使用

You need to use -[UIApplication openURL:]. For example, you can use

[[UIApplication sharedApplication] openURL: [NSURL URLWithString: @"http://www.stackoverflow.com"]]

注意这也会切换到新的应用程序。应用程序可以使用其plist注册它支持的URL方案。

Note this will also switch to the new app. An application can register the URL schemes it supports using its plist.

这篇关于如何从iphone中的另一个应用程序运行一个应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆