TTOpenInAppActivity
is a UIActivity
subclass that provides an "Open In ..." action to a UIActivityViewController
. TTOpenInAppActivity
uses an UIDocumentInteractionController to present all Apps that can handle the document specified with by the activity items.
- Stud.IP Mobile by Tobias Tiemerding
- PenUltimate by Evernote
- Pinpoint by Lickability (previously Bugshot by Marco Arment)
- WriteDown - a Markdown text editor with syncing support by Nguyen Vinh
- Trail Maker
- Syncspace by The Infinite Kind
- SketchTo by The Infinite Kind
- Calex by Martin Stemmle
- deGeo by MobileInfoCenter
- Lyynifier by Lyyn
- KyBook by Kolyvan
- Photo OCR
- My Wonderful Days
- Name2Brain
- Please tell me if you use TTOpenInAppActivity in your App (just submit it as an issue)!
- 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 TTOpenInAppActivity.m in Target Settings > Build Phases > Compile Sources.
CocoaPods is a dependency manager for Objective-C, which automates and simplifies the process of using 3rd-party libraries like TTOpenInAppActivity
in your projects. First, add the following line to your Podfile:
pod 'TTOpenInAppActivity'
If you want to use the latest features of TTOpenInAppActivity
use normal external source dependencies.
pod 'TTOpenInAppActivity', :git => 'https://github.com/honkmaster/TTOpenInAppActivity.git'
- Add the
TTOpenInAppActivity
subfolder to your project. - Add the required frameworks
UIKit
,ImageIO
andMobileCoreServices
to your project.
NSURL *URL = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"empty" ofType:@"pdf"]];
TTOpenInAppActivity *openInAppActivity = [[TTOpenInAppActivity alloc] initWithView:self.view andRect:((UIButton *)sender).frame];
UIActivityViewController *activityViewController = [[UIActivityViewController alloc] initWithActivityItems:@[URL] applicationActivities:@[openInAppActivity]];
activityViewController.popoverPresentationController.sourceView = self.view;
activityViewController.popoverPresentationController.sourceRect = ((UIButton *)sender).frame;
[self presentViewController:activityViewController animated:YES completion:NULL];
TTOpenInAppActivity
is distributed under the terms and conditions of the MIT license.