I've made a UILabel with a background color programmatically which currently looks like this:
I don't like how the text is so close to the left and right margins of its background color, is there any way to make it start more towards the middle so it'd look like this:
This is how I'm making the label:
let label = UILabel()
label.centerXAnchor.constraint(equalTo: view.centerXAnchor, constant:0).isActive = true
label.centerYAnchor.constraint(equalTo: view.centerYAnchor, constant:0).isActive = true
label.widthAnchor.constraint(equalToConstant: self.view.frame.width - 30.0).isActive = true
label.heightAnchor.constraint(equalToConstant: 100.0).isActive = true
label.numberOfLines = 0
label.layer.cornerRadius = 10.0
label.clipsToBounds = true
label.textAlignment = .center
label.backgroundColor = UIColor.darkGray
label.textColor = UIColor.white