2
我想从我的原生iOS应用程序在SnapChat上共享图像。我试图搜索整合过程,但无法找到任何方式,所以我可以集成逻辑以在SnapChat中从我的应用程序共享图像。 请帮忙。如果可能,请分享任何示例?如何从我的原生iOS应用程序在SnapChat上共享图像?
我想从我的原生iOS应用程序在SnapChat上共享图像。我试图搜索整合过程,但无法找到任何方式,所以我可以集成逻辑以在SnapChat中从我的应用程序共享图像。 请帮忙。如果可能,请分享任何示例?如何从我的原生iOS应用程序在SnapChat上共享图像?
ü试过..当u单击非在我们的应用程序共享按钮: ü可以通过图像或文字或数据
检查代码:
NSArray *objectsToShare = @[your text or image objects..];
UIActivityViewController *activityVC = [[UIActivityViewController alloc] initWithActivityItems:objectsToShare applicationActivities:nil];
NSArray *excludeActivities = @[UIActivityTypeAirDrop,
UIActivityTypePrint,
UIActivityTypeAssignToContact,
UIActivityTypeSaveToCameraRoll,
UIActivityTypeAddToReadingList,
UIActivityTypePostToFlickr,
UIActivityTypePostToVimeo];
activityVC.excludedActivityTypes = excludeActivities;
[self presentViewController:activityVC animated:YES completion:nil];
内ü可以选择snapchat或Facebook或WhatsApp ...全部共享启用的应用程序。
试试这个,它会
NSString *urlstring = [NSString stringWithFormat:@"Your Share URL"];
NSURL *myurl = [NSURL URLWithString:urlstring];
NSArray *myarray = @[myurl];
NSLog(@"%@",myarray);
UIActivityViewController *controller = [[UIActivityViewController alloc] initWithActivityItems:myarray applicationActivities:nil];
柜面使用iPod的共享工作通过使用此条件
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
[self presentViewController:controller animated:YES completion:nil];
}else {
UIPopoverController *popup = [[UIPopoverController alloc] initWithContentViewController:controller];
[popup presentPopoverFromRect:CGRectMake(self.view.frame.size.width/2, self.view.frame.size.height/4, 0, 0)inView:self.view permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
}
你好纳文,我不想打开活动控制器。我想点击一下按钮上的图像,点击它打开Snapchat,我可以分享图像。 –
从你的应用程序到snapchat直接......你的意思....? –
假设我有一个默认图像图标想要在Snapchat上分享。当我点击按钮。有两种选择: - 1-如果直接共享内容(图片),没有打开snapchat应用程序。或者2-如果它打开snapchat并且用户想要编辑共享中的一些内容。 –