请教 iOS 开发关于 AirDrop 下方显示的“在 XX 中打开”的问题
天蓬老师
天蓬老师 2017-04-17 16:27:02
0
1
380
天蓬老师
天蓬老师

欢迎选择我的课程,让我们一起见证您的进步~~

Antworte allen (1)
大家讲道理

这个东西叫 UTI,Uniform Type Identifiers

可以看苹果的文档,在这里

https://developer.apple.com/library/ios/documentation/FileManagement/Conceptual/understanding_utis/understand_utis_declare/understand_utis_declare.html

1. 首先要在 info.plist 里面登记你可以打开的文件类型

  1. 然后别人选择了用你的 App 打开这个文件的话,就会调用这个 function,你实现一下:

  • (BOOL)application:(UIApplication)application openURL:(NSURL)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation

这里面也可以打开一个 controller

差不多就是这样了,找到方向应该可以撸出来了。。如果要 demo 的话。。我也可以撸一个。。(容我晚些时候填坑)

    Neueste Downloads
    Mehr>
    Web-Effekte
    Quellcode der Website
    Website-Materialien
    Frontend-Vorlage
    Über uns Haftungsausschluss Sitemap
    Chinesische PHP-Website:Online-PHP-Schulung für das Gemeinwohl,Helfen Sie PHP-Lernenden, sich schnell weiterzuentwickeln!