gpt4 book ai didi

ios - 当我从我的应用程序将图像发布到 instagram 时,它会直接打开 Instagram 的过滤部分,但我希望它打开 Instagram 的裁剪部分?

转载 作者:塔克拉玛干 更新时间:2023-11-02 21:08:20 28 4
gpt4 key购买 nike

- (IBAction)postToInstagram:(id)sender {
NSURL *instagramURL = [NSURL URLWithString:@"instagram://app"];

if ([[UIApplication sharedApplication] canOpenURL:instagramURL])
{
CGRect rect = CGRectMake(0,0,0,0);
NSString *jpgPath=[NSHomeDirectory() stringByAppendingPathComponent:@"Documents/Home_1_instgram.igo"];
UIImage *imageN = [UIImage imageWithContentsOfFile:[NSString stringWithFormat:@"%@", jpgPath]];

// [UIImagePNGRepresentation(_imageDetail.image) writeToFile:jpgPath atomically:YES];
NSURL *igImageHookFile = [[NSURL alloc] initWithString:[[NSString alloc] initWithFormat:@"file://%@",jpgPath]];
self.documentController.UTI = @"com.instagram.exclusivegram";

self.documentController = [self setupControllerWithURL:igImageHookFile usingDelegate:self];
NSString *caption = self.catalogueImage.caption; //settext as Default Caption

//Removing pre-filled captions from mobile sharing
//http://developers.instagram.com/post/125972775561/removing-pre-filled-captions-from-mobile-sharing

self.documentController.annotation = [NSDictionary dictionaryWithObject:@"Here Give what you want to share" forKey:@"InstagramCaption"];

NSLog(@"caption: %@",caption);

[self.documentController presentOpenInMenuFromRect: rect inView: self.view animated: YES ];
}
else
{
UIAlertView *alert=[[UIAlertView alloc] initWithTitle:@"INSTAGRAM NOT FOUND" message:@"Please install instagram to post to instagram." delegate:nil cancelButtonTitle:nil otherButtonTitles:@"ok", nil];
[alert show];
}
}

最佳答案

我找到了解决方法。在 iOS 中,Instagram 直接将用户发送到过滤器部分,而在 Android 中,用户被定向到裁剪部分。它在 Instagram iPhone Hook 中被提及。谢谢你

关于ios - 当我从我的应用程序将图像发布到 instagram 时,它会直接打开 Instagram 的过滤部分,但我希望它打开 Instagram 的裁剪部分?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35403345/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com