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
"Share Screen" iOS 6
提问by Gustaf Rosenblad
Can I show this "Share Screen" in my own app using iOS 6? Somebody that knows how?
我可以使用 iOS 6 在我自己的应用程序中显示这个“共享屏幕”吗?知道的人怎么办?
回答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 图标