我在 .m 中有这个 UIViewController 和这段代码:
@property (nonatomic,strong) IBOutlet UINavigationBar *navBar;
@property (nonatomic,strong) IBOutlet UIBarButtonItem *button;
@end
@implementation DetailViewController
- (void)viewDidLoad{
[super viewDidLoad];
// Do any additional setup after loading the view.
UIBarButtonItem *listoButton = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"ListoBtn1.png"] style:UIBarButtonItemStyleBordered target:self action:@selector(done:)];
self.navBar.topItem.rightBarButtonItem = listoButton;
//self.navBar.topItem.backBarButtonItem = self.button;
[self setVariables];
}
该按钮出现,但它看起来像这样:
我只希望我的图像出现,而不是那个后退按钮。如何删除它的边框?