1

In my application I have many UIButton and I would like to put an image instead of the simple UIButtonthat Xcode propose to us.

Like something on http://icones.pro/?s=refresh , cause I want to reload some data.

I don't really know how to process, I found some answers but isn't it like Eclipse with Android where we need to add the image in some drawables folders?

And if someone know some other good websites where I can find a lot of icons I would be thankfull :)

Kokodelo
  • 416
  • 1
  • 5
  • 25

1 Answers1

3

Write below code in viewDidLoad :

[YourButtonOutlet setBackgroundImage:buttonImage forState:UIControlStateNormal]; 

You can also set UIButton image from attributes inspector: enter image description here

You can find some awesome icons from here:

https://www.iconfinder.com/

https://design.google.com/icons/

iVarun
  • 6,496
  • 2
  • 26
  • 34