Objective c 在iOS 6上设置初始文本社交框架
如何在tweet/fb composer工作表的Objective c 在iOS 6上设置初始文本社交框架,objective-c,ios,cocoa-touch,ios6,Objective C,Ios,Cocoa Touch,Ios6,如何在tweet/fb composer工作表的setInitialText字符串之外添加UILabel值 我尝试过以各种方式添加myUILabel.text,最终导致崩溃或数据参数,但到目前为止还没有使用过 mySLComposerSheet = [[SLComposeViewController alloc] init]; mySLComposerSheet = [SLComposeViewController composeViewControllerForServiceTyp
setInitialText
字符串之外添加UILabel值
我尝试过以各种方式添加myUILabel.text
,最终导致崩溃或数据参数,但到目前为止还没有使用过
mySLComposerSheet = [[SLComposeViewController alloc] init];
mySLComposerSheet = [SLComposeViewController composeViewControllerForServiceType:SLServiceTypeFacebook]; ///
[mySLComposerSheet setInitialText:@"My message"]; ///can I add UI label value here?
[self presentViewController:mySLComposerSheet animated:YES completion:nil];
啊,很久以前就修好了,需要占位符
[mySLComposerSheet setInitialText:[NSString stringWithFormat:@"My message %@",_myUILable.text]];
为什么
[nsstringwithformat:@“我的邮件”]
?为什么不干脆@“我的消息”
?无论如何,label.text
应该可以正常工作,除非您无法正确管理内存,并且标签被过早释放。HC,是的,这将是更干净的实现。谢谢你的小费。现在修好了