更新时间:2023-12-04 16:04:35
For just showing the share UI with icons, you probably want UIActivityViewController
.
NSString* someText = self.textView.text;
NSArray* dataToShare = @[someText]; // ...or whatever pieces of data you want to share.
UIActivityViewController* activityViewController =
[[UIActivityViewController alloc] initWithActivityItems:dataToShare
applicationActivities:nil];
[self presentViewController:activityViewController animated:YES completion:^{}];
It looks like:
Documentation here.