2015-02-23 70 views
0

如果用户安装了Google plus,那么他将能够使用更多按钮选择Google plus应用程序,并在活动视图控制器上显示Google plus图标。有没有办法删除谷歌加按钮?如何从活动视图控制器中删除谷歌加按钮?

我已经添加了下面的代码,但它仍然没有帮助:

avc.excludedActivityTypes = @[@"com.google.GooglePlus.ShareExtension"]; 
     //-- show the activity view controller 
     [self presentViewController:avc 
          animated:YES completion:nil]; 
+0

你的问题还不够清楚 – 2015-02-23 21:46:07

+0

已编辑的问题。希望它是有道理的! – 2015-02-23 22:56:12

回答

0

首先,你需要知道的是,谷歌加扩展使用活动类型。您可以通过添加:

[(UIActivityViewController *)controller setCompletionHandler:^(NSString *activityType, BOOL completed){ 
    NSLog(@"type: %@", activityType); 
}]; 

选择Google Plus操作并共享一些内容;控制台会为您记录类型标识符。

然后,您需要将其添加到您的excludedActivityTypes

((UIActivityViewController *)controller).excludedActivityTypes = @[@"<whatever the type was>"]; 
+0

是的,我做到了。 – 2015-02-23 22:07:05

+0

那么您是否已成功删除Google Plus按钮? – 2015-02-23 22:09:07

+0

不,我添加了以上使用的代码。 – 2015-02-23 22:16:18