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:

result in other ios devices:

i've tried anti-alias , rasterized options. however, got same result.
it work if set borderwidth > 2pt.
Comments
Post a Comment