UIBarButtonItem with custom image and no border

前端 未结 9 693
旧巷少年郎
旧巷少年郎 2020-12-12 12:18

I want to create a UIBarButtonItem with a custom image, but I don\'t want the border that iPhone adds, as my Image has a special border.

It\'s the same as the back b

9条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-12 12:48

    UIBarButtonItem *menuItem = [[UIBarButtonItem alloc] initWithImage: [UIImage imageNamed:@"icon-menu.png"]
                                                                        style:UIBarButtonItemStylePlain
                                                                       target:self
                                                                       action:@selector(showMenu)];
    

提交回复
热议问题