Reputation: 6247
Is there a UIBarButtonSystem icon that is "-" minus? Opposite of this:
Thanks.
Upvotes: 2
Views: 1064
Reputation: 1387
I use from the menu Edit -> Emoji & Symbols the EM DASH symbol. It's like a minus but wider. For example:
navigationItem.leftBarButtonItem = UIBarButtonItem(title: "—", style: .plain, target: self, action: #selector(removeColumn))
Upvotes: 1
Reputation: 44633
No, All the available icons are here. You can use a custom view instead.
Upvotes: 2
Reputation: 31720
To get minus, you could create an custom button with minus image,
if you look into the below apple documentation for available system UIBar.. buttons
there is no minus kind of button available So you will have to create by yourself.
Use the below code to create an button with minus image, create UIBarButtonItem
by adding your button as custom view,
UIImage *image=[UIImage imageNamed:@"minus.png"];
UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
button.bounds = CGRectMake( 0, 0, image.size.width, image.size.height );
[button setImage:image forState:UIControlStateNormal];
[button addTarget:self action:@selector(Minus) forControlEvents:UIControlEventTouchUpInside];
UIBarButtonItem *barButtonItem = [[UIBarButtonItem alloc] initWithCustomView:button];
self.navigationItem.rightBarButtonItem = barButtonItem;
[barButtonItem release];
Upvotes: 0