Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to make button round with image background in IPhone?

I have a round button, but i will make it have a backgroud with image.

but when i do it, by setting the (what) property to an image, the button becomes rectangle because the image is a rectangle. How do I keep the button round?

like image 973
user4951 Avatar asked Dec 27 '22 19:12

user4951


1 Answers

Simply by doing this

#import <QuartzCore/QuartzCore.h>
myButton.layer.cornerRadius = 8;
like image 90
Craig White Avatar answered Jan 23 '23 18:01

Craig White