Currently the label displayed has a custom radius set for the top right and bottom right corners. However the background color the the label is not filling entirely.
Have attempted to set the layers maskToBounds
property to true and false.
Attempted changing both the dateLabel.backgroundColor
and dateLabel.layer.backgroundColor
to the desired dark blue color programmatically that is defaulted in the storyboard in an attempt to refill the label with no success.
@IBOutlet weak var dateLabel: UILabel! { didSet {
dateLabel.round(corners: [.topRight, .bottomRight], radius: 15, borderColor: UIColor.cyan, borderWidth: 3.0)
dateLabel.setNeedsLayout()
}}
override func viewDidLayoutSubviews() {
dateLabel.layoutIfNeeded()
}
override func viewDidLoad() {
super.viewDidLoad()
dateLabel.layer.backgroundColor = UIColor.blue
}
What could be the reason for a label not filling its view entirely and what solution is available?