UIDocumentInteractionControllerおよびUIActivityViewControllerは、イメージを他のネットワークに共有するための両方のメニューを表示します。 Instagramを叩いた後、あなたはアプリを離れることなくInstagramに投稿できる素敵なモーダルが表示されます。私の質問は、メニューを表示せずにモーダルを自動的にどのように表示するのですか?UIDocumentInteractionControllerまたはUIActivityViewControllerでInstagramを自動的に選択
このアプリはSoundsと呼ばれているため、可能性があると私は知っていますが、どのようにして完了したかに関するオンラインのドキュメントは見つかりません。ここでは、メニューを示し、私が持っている現在のコードは次のとおりです。
NSString *documentDirectory=[NSHomeDirectory() stringByAppendingPathComponent:@"Documents"];
NSString *saveImagePath=[documentDirectory stringByAppendingPathComponent:@"Image.ig"];
NSData *imageData=UIImagePNGRepresentation(cardImage);
[imageData writeToFile:saveImagePath atomically:YES];
NSURL *imageURL=[NSURL fileURLWithPath:saveImagePath];
UIDocumentInteractionController *docController = [UIDocumentInteractionController interactionControllerWithURL:imageURL];
docController.UTI = @"com.instagram.exclusivegram";
docController = [self setupControllerWithURL:imageURL usingDelegate:self];
[docController presentOpenInMenuFromRect:CGRectMake(1, 1, 1, 1) inView:self.view animated:YES];
ここでメニューです:
ここで私が自動的に表示したいものです。
あなたは、問題への解決策を見つけますか?私は同じ問題を抱えている。 –