Dragon warrior
Dragon warrior

Reputation: 1644

How can I highlight the BarButton in navigation bar without tapping it?

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?

Upvotes: 1

Views: 382

Answers (1)

iDev
iDev

Reputation: 23278

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.

Upvotes: 1

Related Questions