How to create an oval shape UIButton
I have to draw an oval shape button, i don't want to set the image in oval
shape.
I have read that you can draw different shaper with UIBezierPath but i am
unable to draw a proper oval shape.
Here is the code is am using to create a circular shape.
self.layer.borderWidth=1.0;
self.clipsToBounds = YES;
[self setTitleColor:ktextColor forState:UIControlStateNormal];
self.layer.cornerRadius = self.bounds.size.width/2;//half of the width
self.layer.borderColor=[[UIColor whiteColor]CGColor];
Any help is appreciated !!
No comments:
Post a Comment