Created
December 20, 2013 04:37
-
-
Save keicoder/8050467 to your computer and use it in GitHub Desktop.
objective-c : UIActivityViewController 공유 메소드
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.h | |
@interface AddViewController : UIViewController <MFMailComposeViewControllerDelegate, MFMessageComposeViewControllerDelegate, UIActionSheetDelegate> | |
.m | |
UIActivityViewController 공유 메소드 | |
- (IBAction)share:(id)sender { | |
NSString *note = self.currentNote.note; | |
NSArray *activityItems = @[note]; | |
UIActivityViewController *activityViewController = [[UIActivityViewController alloc] // 공유 액티비티 뷰 호출 | |
initWithActivityItems:activityItems | |
applicationActivities:nil]; | |
activityViewController.excludedActivityTypes = @[ ]; | |
[self presentViewController:activityViewController animated:YES completion:nil]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment