I want to create a system UIBarButton, but I want it to have plain style.
I’ve tried with this code, but the style is ignored.
What’s wrong with it?
UIBarButtonItem *search = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemSearch target:self action:@selector(showSearch)];
search.style = UIBarButtonItemStylePlain;
self.navigationItem.rightBarButtonItem = search;
[search release];
Found a similar thread here.
It seems that the way to go about making this plan is to create your custom UIButton and assign it to the bar button.