ars

ARSafariActivity

A UIActivity subclass that opens URLs in Safari

Showing:

Popularity

Downloads/wk

0

GitHub Stars

54

Maintenance

Last Commit

6yrs ago

Contributors

6

Package

Dependencies

0

License

MIT

Categories

Readme

ARSafariActivity is a UIActivity subclass that provides an "Open in Safari" action to a UIActivityViewController.

ARSafariActivity screenshot

Requirements

  • As UIActivity is iOS >= 6 only, so is the subclass.
  • This project uses ARC. If you want to use it in a non ARC project, you must add the -fobjc-arc compiler flag to ARSafariActivity.m in Target Settings > Build Phases > Compile Sources.

Installation

Add the ARSafariActivity subfolder to your project. There are no required libraries other than UIKit.

Usage

(See example Xcode project)

Simply alloc/init an instance of ARSafariActivity and pass that object into the applicationActivities array when creating a UIActivityViewController.

NSURL *url = [NSURL URLWithString:@"http://alexruperez.com"];
ARSafariActivity *safariActivity = [[ARSafariActivity alloc] init];
UIActivityViewController *activityViewController = [[UIActivityViewController alloc] initWithActivityItems:@[url] applicationActivities:@[safariActivity]];
[self presentViewController:activityViewController animated:YES completion:nil];

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.

Thanks

podspec file added by @aaronbrethorst bundle added by @raymondjavaxx iOS6 icon from http://iconfinder.com and added by @banaslee

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100