0

I have added BarButtonItem using system image "plus.color.fill", then I got small image with background blue colored.

How to add background color or how to increase the size of BarButton.

I have to get the button like in image below. Currently getting a small image

view BarButton image

Phil Dukhov
  • 67,741
  • 15
  • 184
  • 220
JESTIN SAJI
  • 53
  • 1
  • 15
  • 1
    Does this answer your question? [How can I change the background color of a UIBarButtonItem on iOS 7+?](https://stackoverflow.com/questions/26348952/how-can-i-change-the-background-color-of-a-uibarbuttonitem-on-ios-7) – Turtleeeeee Oct 11 '21 at 09:08
  • Custom UIButton on UINavigationBar could solve your problem. If you're talking about the size of the button on UINavigationBar, you could also see https://stackoverflow.com/questions/17079135/ios-set-size-of-button-in-title-of-uinavigationbar – Turtleeeeee Oct 11 '21 at 09:50
  • Nothing got worked @Turtleeeeee I think those are in objective c. – JESTIN SAJI Oct 11 '21 at 10:22
  • @Turtleeeeee Im not trying to add image me trying to add color as background of barbutton – JESTIN SAJI Oct 11 '21 at 10:24
  • That's the same. OC code can be translated into swift. As I could remember, UIBarButtonItem can't easily change size. Customizing a button and put it on will be a better choice. But if color is the only thing you want to change, try to set `tintColor` on `UIBarButtonItem` – Turtleeeeee Oct 11 '21 at 10:35
  • @Turtleeeeee not working – JESTIN SAJI Oct 11 '21 at 13:36
  • Show me your code. Changing color of UIBarButtonItem is really not hard. – Turtleeeeee Oct 12 '21 at 01:40

0 Answers0