Here is the code I use to setup the border of my UIView:
self.layer.borderColor = [UIColor whiteColor].CGColor;
self.layer.cornerRadius = self.bounds.size.height/2;
self.layer.borderWidth = 0.5;
And this is what it looks like:

The horizontal part is correct, but is there a way of getting the curved parts "smoother" whilst keeping a 1 pixel line width on retina devices? It looks very aliased right now.
Thanks!
You should change self.layer.borderWidth = 0.5; to self.layer.borderWidth = 1.f;
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