Creating the effect of "backlight" on the button "Dark Information" on a white background

If I put the “info light” button in the lower corner of the screen on a dark background and check “Shows Touch On Hightlight”, I get a nice highlight effect when the user touches the icon. This gives the user positive feedback.

In my application, the background is white. Therefore, I chose the "dark information" button. Checked "Shows Touch On Highlight" and "Highlighted Adjusts Image". But since the background is white, the highlight effect is not displayed, and the user does not receive any feedback.

How can I create some kind of backlight / backlight effect to give some feedback for use and then the info button is pressed?

+3
source share
2 answers

Update: I figured it out. Create a new image with a dark glow called infoDarkHighlighted.png and set the following to the moutod viewController viewDidLoad.

[infoButton setImage: [UIImage imageNamed: @ "infoDarkHighlighted.png"] forState: UIControlStateHighlighted];

+7
source

The “glow” that you see when you touch the button is fixed and cannot be changed.

It’s best to write your own button that provides this glow, but in a dark color.

+1
source

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


All Articles