7

I am working for Facebook integration in my iPad app. I am using FBFriendPickerViewController for same. My app is working fine on iOS 6 for landscape as well as portrait mode but when I use iOS 7 then friend picker controller works fine ONLY for portrait. When try to launch it in landscape mode then white view pops up. I could see faint friend picker view in background but very hard to see that. Do anyone have any idea what must be the reason? Code base I have used is as below.

 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];

Same thing I have observed on facebook sample app "HelloFacebookSample" :)

Ameer
  • 705
  • 8
  • 18
  • I am experiencing the same exact issue. It was fully functional under iOS6 in landscape. My function syntax doesn't vary much from above either so I am wondering if it is an issue with the friendpicker class itself? – Doug Oct 17 '13 at 02:25
  • Yes i think so, coz i tried so many thinks but didn't get success – Ameer Oct 17 '13 at 05:04
  • I filed a bug report with Facebook. We might be waiting awhile so probably best to start looking at alternatives. – Doug Oct 17 '13 at 13:00
  • Hey.. Thanks Doug. Please post once you receive any feedback from Facebook – Ameer Oct 23 '13 at 04:31
  • Incidentally, if anyone else comes across the issue, the Facebook bug report is: https://developers.facebook.com/bugs/605086346220205 Please add to it. – Doug Nov 18 '13 at 00:52
  • It seems like this is related to their handling of the status bar in the SDK, I found that turning it off in the presenting view controller seems to work around this problem. Just make sure you have a method like this one : `- (BOOL)prefersStatusBarHidden { return YES; }` – megastep Dec 11 '13 at 00:46

1 Answers1

1

Try:

  1. Get the newest Facebook SDK, because in the above link a Facebook rep says the issue should be resolved. The modal frame still takes into account the space for the status bar so you'll have to find a way to deal with it (doesn't bother me enough to spend time solving it at this point).

  2. I also removed a [[UINavigationBar appearance] setTitleTextAttributes:]; line from my app delegate, so maybe try removing all nav bar customisation and see what you get.

Good luck.

Rajesh
  • 10,318
  • 16
  • 44
  • 64
Sebaronius
  • 11
  • 2