KevinB
KevinB

Reputation: 2484

Swift Animation - Circle behind button

I'm trying to add some animation in my app. I would like to show a circle when I tap a button.

enter image description here enter image description here

I don't really know what could be the best way to do that.

Do I have to create on the storyboard a view with a background, and I add corner radius and use the isHidden property ?

Do I have to create the circle programmatically ? Maybe better because I have many buttons ?

Upvotes: 1

Views: 331

Answers (1)

aashish tamsya
aashish tamsya

Reputation: 4959

BEST WAY:

DEMO

enter image description here

1. Assets Used

enter image description here

enter image description here

enter image description here

  1. Set Default Image on Default State of UIButton

enter image description here

  1. Set Highlighted Image on Highlighted State of UIButton

enter image description here

Upvotes: 3

Related Questions