Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要向Open iniOS 8 共享扩展添加一个按钮,就像应用程序Twitshot所做的那样。如果您分享来自 的链接,您将获得菜单>Safari >Share >Twitshot。怎么可能呢?
Open in
>Safari >Share >Twitshot
这不是真正的共享扩展。
他们只是使用UIAlertControllerwith 动作。他们的动作是标题在 TwitShot 应用程序中打开。当用户点击它时,他们只是使用打开应用程序的自定义 URL:例如打开 YouTube 它将是:
UIAlertController
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"YouTube://"]];
您只需要您要打开的应用程序的自定义 URL 方案