For some reason the iOS button standard circle with an "i" in it for .infoLight isn't showing when I run the function below to programmatically add a UIButton (and I do want to do this programmatically rather than in the interface builder) - I'm adding it to a UIPageViewController. I do get a button in the lower left of the screen, and I've set it to .backgroundColor = .lightGray to verify it has been added to the subview & is working (image on the left, below). Any thoughts on the likely very basic thing that I'm missing? Much thanks!
func configureAboutButton() {
let aboutButtonHeight: CGFloat = 44
let aboutButtonWidth: CGFloat = 44
aboutButton = UIButton(type: .infoLight)
aboutButton.tintColor = UIColor.red
aboutButton = UIButton(frame: CGRect(x: 0, y: view.frame.height - aboutButtonHeight, width: aboutButtonWidth, height: aboutButtonHeight))
aboutButton.backgroundColor = .lightGray
aboutButton.addTarget(self, action: #selector(segueToAboutVC), for: .touchUpInside)
view.addSubview(aboutButton)
}
Curiously if I add this line just below where I set background color, the image on the right shows (otherwise I get the image on the left).
aboutButton.setTitle("X", for: .normal)