【发布时间】:2013-05-07 16:07:35
【问题描述】:
我使用了以下代码,instagram 应用显示了我的照片,但没有显示我想要分享的文字。
我使用了注释属性,但它不起作用。不知道哪里错了?
instagram 版本:3.5.0
我的 iphone 版本:5.0.1
xcode 版本:4.6
问候。
NSURL *instagramURL = [NSURL URLWithString:@"instagram://app"];
if ([[UIApplication sharedApplication] canOpenURL:instagramURL])
{
NSString *jpgPath = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents/image.igo"];
NSString *urlString = [[NSString alloc] initWithFormat:@"file://%@", jpgPath];
NSURL *imageUrl = [[NSURL alloc] initWithString: urlString];
self.docController = [self setupControllerWithURL:imageUrl usingDelegate:self];
self.docController.UTI = @"com.instagram.exclusivegram";
self.docController.annotation = [NSDictionary dictionaryWithObject:@"I want to share this text" forKey:@"InstagramCaption"];
[self.docController presentOpenInMenuFromRect: self.view.frame inView: self.view animated: YES ];
}
【问题讨论】:
-
谢谢。但我的问题是“self.docController.annotation = [NSDictionary dictionaryWithObject:@"I want to share this text" forKey:@"InstagramCaption"]; "共享文本不起作用。