My NSTextField has rounded corners and a white background color, but it seems as though the view itself is rectangular. This means the space between the rounded corners and the bounding rectangle are showing as transparent. How can I fill in this area so that it doesn't stand out?
Image:
Code:
let textFieldLayer = CALayer()
textField.layer = textFieldLayer
textField.backgroundColor = NSColor.whiteColor()
textField.layer?.backgroundColor = NSColor.whiteColor().CGColor
textField.layer?.borderColor = NSColor(calibratedRed: 47/255.0, green: 146/255.0, blue: 204/255.0, alpha: 1.0).CGColor
textField.layer?.borderWidth = 1
textField.layer?.cornerRadius = 7