0

Application shows UIBarButtonItem in the self.navigationItem.leftBarButtonItem successfully.

Button created like this.

self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:Localized(kSelect) style:UIBarButtonItemStylePlain
                                                                        target:self action:@selector(onSelectButtonPressed:)];

And everything works fine only when i enable Enable Button Shapes in Accessibility leftBarButtonItem is disappearing but is still active and i can select this button. After debagging it is possible to highlight that button text is changed to the white.

Oleg Gordiichuk
  • 15,240
  • 7
  • 60
  • 100

1 Answers1

0

Use the UIButton and then customise it according to your need, then instantiate UIBarButtonItem from it.

UIButton *myBtn = [[UIButton alloc] init];
//
// do your necessary customisation on myBtn
//

UIBarButtonItem *barBtn = [[UIBarButtonItem alloc] initWithCustomView:myBtn];
Ratul Sharker
  • 7,484
  • 4
  • 35
  • 44