Search code examples
facebookios6facebook-ios-sdk

FBUserSettingsViewController hide navigation bar


When I present FBUserSettingsViewController modally, it has a navigation bar with cancel and done bar buttons on it.

How to hide it?

FBUserSettingsViewController *settings = PF_FBUserSettingsViewController.new;
settings.delegate = self;
[self presentViewController:settings animated:YES completion:nil];

Solution

  • You can hide the toolbar by setting both the doneButton and cancelButton of the FBUserSettingsViewController to nil:

    self.settingsViewController.doneButton = nil;
    self.settingsViewController.cancelButton = nil;
    

    This has been verified in Facebook SDK 3.2.