Typically, the UIBarButtonItem will be highlighted when we tap it.
However, I intend to show the users that the action is automatically done for them when the view is loaded after 4 sec.
So I want to highlight the Button without tapping it.
How can I achieve that?
For a UIVIew
object such as a UIButton
, you can either use the following code Glow category on UIView that adds support for making views glow or use this example .
If you are using the first one, you can just call startGlowing
and stopGlowing
. When you call startGlowing
, the view will start to pulse with a soft light, this effect is removed when stopGlowing
is called. Check this .
For UIBarButtonItem
, you might have to use the solution provided here .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.