我想创建一个系统 UIBarButton,但我希望它具有简单的样式。
我已经尝试过使用此代码,但样式被忽略了。它出什么问题了?
UIBarButtonItem *search = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemSearch target:self action:@selector(showSearch)];
search.style = UIBarButtonItemStylePlain;
self.navigationItem.rightBarButtonItem = search;
[search release];