0

I was using method in below to show a toolbar on bottom with a title.

UIBarButtonItem *item = [[UIBarButtonItem alloc] initWithTitle:@"Your Title"
                                                         style:UIBarButtonItemStylePlain
                                                        target:nil
                                                        action:nil];

UIBarButtonItem *spacer = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace
                                                                        target:nil
                                                                        action:nil];

NSArray *items = [[NSArray alloc] initWithObjects:spacer, item, spacer, nil];
[self.navigationController setToolbarHidden:NO animated:YES];

However, the title on toolbar is clickable, and I've no idea to disable user interaction from it because the toolbar was created by self navigationController.

Do you guys have resolution for this? Thanks for your prompt helped in advance.

Lothario
  • 300
  • 1
  • 5
  • 10

1 Answers1

0

Problem perfect solved by:

[[[self navigationController] toolbar] setUserInteractionEnabled:NO];

and I found out there've more details to custom toolbar in navigation. Click Here

Community
  • 1
  • 1
Lothario
  • 300
  • 1
  • 5
  • 10