Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

FBFriendPickerViewController for iOS 7 doesn't work as expected in landscape mode

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" :)

like image 984
Ameer Avatar asked Oct 05 '13 15:10

Ameer


1 Answers

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.

like image 138
Sebaronius Avatar answered Oct 21 '22 14:10

Sebaronius