How to make a UIBarButtonItem like this

后端 未结 3 1383
無奈伤痛
無奈伤痛 2021-01-14 14:39

How can I make a UIBarButtonItem like this: \"enter

I can\'t find it in the SystemItem

3条回答
  •  时光说笑
    2021-01-14 15:08

    That's probably using something like:

    [[UIBarButtonItem alloc] initWithImage:@"info.png" style:UIBarButtonItemStyleBordered target:nil action:nil]
    

    I tried with:

    UIBarButtonItem *item = [[UIBarButtonItem alloc] initWithCustomView:[UIButton buttonWithType:UIButtonTypeInfoLight]];
    item.style = UIBarButtonItemStyleBordered;
    

    but it seems like with a custom view the bordered style doesn't get applied.

提交回复
热议问题