I found one strange problem with rounded UIButton.
This is my code for creating this button.
let roundedButton = UIButton(type: .System) roundedButton.frame = CGRectMake(100, 100, 100, 100) roundedButton.backgroundColor = UIColor.blackColor() roundedButton.layer.borderColor = UIColor.whiteColor().CGColor roundedButton.layer.borderWidth = 3.0 roundedButton.layer.cornerRadius = roundedButton.frame.size.width/2 roundedButton.layer.masksToBounds = true self.view.addSubview(roundedButton)
As you can see, there is a UIButton with backgroundColor, border and angular radius. It is fully rounded. But in the output, I get the following view: 
You can see that the 1px border is outside the button, this is its backroundColor (black). It seems that its inner border (white) does not start with the edje button.
Do you have an idea how to fix this?
source share