How to turn off the light that appears when you touch UIBarButtonItem?

I have a toolbar with a UIBarButtonItem with the style: UIBarButtonItemStylePlain . I wonder how I can turn off the light that appears when touched?

UIButton has the UIButton property, but there is no such thing for UIBarButtonItem , is there such work that you may know?

+4
source share
2 answers

In the Builder interface, drag the UIButton to the toolbar. It will create a UIBarButtonItem with a UIButton in it. Set the UIButton type as you like. Then you can fully customize the visibility. For example, change the text color to white and the background color to transparent and, of course, turn off the selection.

+5
source

You can also remove the UITextField and make it inaccessible for editing.

0
source

Source: https://habr.com/ru/post/1339149/


All Articles