如何制作'打开'菜单?你以前见过它们。照片,Instagram,电子邮件。
答案 0 :(得分:2)
我曾经想过如何制作Apple'Open In'菜单。这其实很简单!
NSString* someText = @"Sent from my app!";
UIImage* image = imageview.image;
NSArray* dataToShare = @[someText, image]; //Array of sharable stuff.
UIActivityViewController* activityViewController =
[[UIActivityViewController alloc] initWithActivityItems:dataToShare
applicationActivities:nil];
[self presentViewController:activityViewController animated:YES completion:^{}];
多数民众赞成。你真的不需要更多,因为它非常简单。