Follow

Customising the Toolbar

The toolbar that appears on double tap can be fully customised. The color and the buttons can be customised and moved, exactly as standard iOS objects, using the .xib or code in the DocumentViewController.m.

The toggleNavigator method is triggered on double tap and toggles the top toolbar and the thumbnail navigation at the bottom of the screen. It is possible to make the toolbar visible consistently rather than on double tap if desired. As the toggleNavigator method also controls the navigation thumbnails, you will need to create a separate method if you want to maintain the show/hide functionality on the navigation. You can then trigger this method however you wish - double tap, UIButton in the toolbar, etc.

In order to make the toolbar appear consistently, rather than on double tap, set the toolbar to be visible in the viewDidLoad method:

- (void)viewDidLoad {
  [toolbar setHidden:NO];
  [self enableToolbar:YES];
} 

You will also need to alter the functionality that hides the toolbar on double tap.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Powered by Zendesk