- (BOOL)openURL:(NSURL *)url
An object representing a URL (Universal Resource Locator). UIKit supports the http:, https:, tel:, and mailto: schemes.
在你的应用中,调用api可以直接打开这些作为前缀的一些URL(注意:URL的本意<统一资源定位>,不仅仅是网址)
而且这些Schema都是Apple-registered ,也就是苹果内置注册的Schema,比方你在你的应用程序中OpenURL http://www.baidu.com
那么就会自动调用safari浏览器打开这个网址,同样使用 zhangsan@126.com 会打开邮件程序发送邮件。。。。这些都是苹果已经做好的,
好了,那么这个Schema是不是可以个性化呢,也就是custom呢,答案是肯定的,比方:
制作了a应用,想在别人<别的应用程序>openurl:@“myapp://”时自动打开你的a应用,那么这个是可以实现的,也就是注册自己的Schema给系统,系统到时候接收到别人openurl你的schema时就会调用你的应用。
下面详细图文说明如何实现