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 Objective C:
submitButton.layer.cornerRadius = 5; submitButton.clipsToBounds = YES;
For Swift:
submitButton.layer.cornerRadius = 5 submitButton.clipsToBounds = true