ios - Strange behaviour while setting border with corner radius -


i want set round border uibutton 1px (as thick table separator), set 1/uiscreen.mainscreen().scale.

in custom uibutton class:

self.layer.maskstobounds = true; self.layer.cornerradius = self.frame.height / 2; self.layer.bordercolor = uicolor.whitecolor().cgcolor; self.layer.borderwidth = 1/uiscreen.mainscreen().scale; 

result in iphone 6plus expected:

iphone 6 plus result

result in other ios devices:

other results

i've tried anti-alias , rasterized options. however, got same result.

it work if set borderwidth > 2pt.


Comments