我正在为我的 iPad 应用程序中的 Facebook 集成工作。我正在使用 FBFriendPickerViewController 同样。我的应用程序在 iOS 6 上的横向和纵向模式下运行良好,但是当我使用 iOS 7 时,好友选择器 Controller 仅适用于纵向模式。当尝试以横向模式启动它时,会弹出白色 View 。我可以在背景中看到微弱的 friend 选择器 View ,但很难看到。有谁知道一定是什么原因?我使用的代码库如下。
if (!_friendPicker) {
self.friendPicker = [[FBFriendPickerViewController alloc] init];
// _friendPicker.delegate = self;
_friendPicker.title = @"Select a friend";
_friendPicker.allowsMultipleSelection = NO; // Share dialog doesn't allow more than one recipient
}
[_friendPicker clearSelection];
[_friendPicker loadData];
_friendPicker.modalPresentationStyle = UIModalPresentationFormSheet;
[_friendPicker presentModallyFromViewController:self
animated:YES
handler:nil];
我在 facebook 示例应用程序“HelloFacebookSample”上观察到了同样的事情 :)
最佳答案
尝试:
获取最新的 Facebook SDK,因为在上面的链接中,Facebook 代表表示该问题应该得到解决。模态框架仍然考虑到状态栏的空间,因此您必须找到一种方法来处理它(此时我不会花时间解决它)。
我还从我的应用程序委托(delegate)中删除了
[[UINavigationBar appearance] setTitleTextAttributes:];
行,因此也许可以尝试删除所有导航栏自定义项,看看会得到什么。
祝你好运。
关于facebook - 适用于 iOS 7 的 FBFriendPickerViewController 在横向模式下无法正常工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19199406/