Facebook UIActivityViewController缺少取消和发布按钮 [英] Facebook UIActivityViewController is Missing the Cancel and Post Buttons
问题描述
当我的应用程序打开Facebook UIActivityViewController
时,Facebook屏幕顶部没有导航栏,也没有取消或发布按钮 - 退出的唯一方法屏幕是杀死应用程序。我看到的其他应用程序在Facebook屏幕的顶部有一个额外的导航栏,其中包含取消和发布按钮。
When my app opens the Facebook UIActivityViewController
, there is no navigation bar at the top of the Facebook screen and there is no Cancel or Post button - the only way to exit the screen is to kill the app. Other apps that I look at have an additional navigation bar at the top of the Facebook screen, which holds the Cancel and Post buttons.
这是我正在使用的代码:
Here is the code I am using:
NSURL *url = [NSURL URLWithString:@"http://www.mywebsite.com"];
NSArray *activityItems = @[url];
// Put together the UIActivityViewController
UIActivityViewController *activityVC = [[UIActivityViewController alloc]
initWithActivityItems:activityItems
applicationActivities:nil];
activityVC.excludedActivityTypes = @[UIActivityTypePrint,
UIActivityTypeCopyToPasteboard,
UIActivityTypeAssignToContact,
UIActivityTypeSaveToCameraRoll,
UIActivityTypeAirDrop,
UIActivityTypePostToVimeo,
UIActivityTypePostToFlickr,
UIActivityTypeAddToReadingList];
// Present the UIActivityViewController
[self presentViewController:activityVC
animated:YES
completion:nil];
Twitter,电子邮件和短信屏幕均按预期显示。 Facebook是唯一一个遇到问题的人。
The Twitter, Email, and SMS screens all appear as expected. Facebook is the only one that is having problems.
其他一些注意事项:我注意到当我在这个应用程序上打开Facebook Share时,状态栏变为黑色,带有白色文本。在我创建的另一个测试应用程序上,状态栏看起来呈灰色,带有黑色文本。不知道为什么/这是什么意思,但可能是一个线索。
Some other notes: I notice that when I open the Facebook Share on this app, the status bar turn black with white text. On another test app that I created, the status bar looks grayed-out with black text. Not sure why / what this points to, but might be a clue.
这个问题似乎是应用范围的,因为我有3个点可以调用共享,并且它发生在所有3个实例中。
This problem seems to be app-wide, as I have 3 spots where sharing can be invoked, and it is happening in all 3 instances.
附加图像。 To:Public工具栏上方应该有一个导航栏。
Attaching an image. There should be a Navigation bar above the "To: Public" toolbar.
任何想法都将不胜感激。
Any ideas would be appreciated.
推荐答案
我创建了新的应用程序,并在按钮操作上复制粘贴代码。这是完美的工作。您可以在此处查看图片: https://drive.google。 com / file / d / 0B0FNcjA1N299NWdmZGZQWC1KbzA / view?usp = sharing
I have created new app and copy pasted your code on button action. It is workiing perfectly. You can check image of it over here: https://drive.google.com/file/d/0B0FNcjA1N299NWdmZGZQWC1KbzA/view?usp=sharing
据我所知,如果你做了一些 [ UINavigationBar外观]
在你的应用程序中,然后只有它出现问题。请检查一下。
As per my knowledge, If you have done something with [UINavigationBar appearance]
in your app, then and then only it makes the problem. Please check that.
这篇关于Facebook UIActivityViewController缺少取消和发布按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!