CocoaPods trunk is moving to be read-only. Read more on the blog, there are 14 months to go.
| TestsTested | ✗ |
| LangLanguage | Obj-CObjective C |
| License | BSD |
| ReleasedLast Release | Mar 2015 |
Maintained by David Beck.
TUSafariActivity is a UIActivity subclass that provides an "Open In Safari" action to a UIActivityViewController.
(See example Xcode project)
Simply alloc/init an instance of TUSafariActivity and pass that object into the applicationActivities array when creating a UIActivityViewController.
NSURL *URL = [NSURL URLWithString:@"http://google.com"];
TUSafariActivity *activity = [[TUSafariActivity alloc] init];
UIActivityViewController *activityViewController = [[UIActivityViewController alloc] initWithActivityItems:@[URL] applicationActivities:@[activity]];let URL = NSURL(string: "http://google.com")!
let activity = TUSafariActivity()
let activityViewController = UIActivityViewController(activityItems: [URL], applicationActivities: [activity])Note that you can include the activity in any UIActivityViewController and it will only be shown to the user if there is a URL in the activity items.