xcode “共享屏幕”iOS 6

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/12418412/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 01:29:36  来源:igfitidea点击:

"Share Screen" iOS 6

iphoneiosxcodeios6

提问by Gustaf Rosenblad

Can I show this "Share Screen" in my own app using iOS 6? Somebody that knows how?

我可以使用 iOS 6 在我自己的应用程序中显示这个“共享屏幕”吗?知道的人怎么办?

iOS Share Screen

iOS 共享屏幕

回答by Ertai

I'm afraid you are all wrong. I'm sorry for being this negative, but your wrong answers forced me to waste time in going for futile solutions.... instead you can use this code to achive this screen:

恐怕你们都错了。我很抱歉这么消极,但你的错误答案迫使我浪费时间去寻找徒劳的解决方案......相反,你可以使用此代码来实现此屏幕:

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:^{}];

The code is from Social.framework.

代码来自 Social.framework。

See this answer: Using Apple icons with iOS 6

请参阅此答案:在 iOS 6 中使用 Apple 图标