I have a rectangle image (jpg) and want to use it to fill the background of a button with rounded corner in xcode.
I wrote the following:
UIButton *b
For Swift:
button.layer.cornerRadius = 10.0