I have a little doubt to make a ellipse shape using UIView.
My view has a dimension like w:50.0f e h:20.0f and using this command:
[[viewElement layer] setCornerRadius:w/2];
But the shape isn't a good shape for ellipse.
I want this:

The borders of shape is distorted, can I make an ellipse shaped like which is expected?
Thanks
Try this:
viewElement.frame = CGRectMake(0, 0, w, w);
viewElement.layer.cornerRadius = w / 2;
viewElement.transform = CGAffineTransformMakeScale(1, h / w);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With