iOS Build a Simple iPhone App with Swift Improving Our User Interface Random Colors

Elena Iliasova
seal-mask
.a{fill-rule:evenodd;}techdegree
Elena Iliasova
iOS Development with Swift Techdegree Student 1,739 Points

Random Colors of button

Hi for some reason, the text color of the buttons does not change for me, I don’t understand what the error is, tell me please import UIKit

class ViewController: UIViewController { @IBOutlet weak var FunFactLabel: UILabel!

@IBOutlet weak var funFactButton: UIButton!

let factProvider = FactProvider()
let colorProvider = BackgraundColorProvider()
override func viewDidLoad() {
    super.viewDidLoad()
    FunFactLabel.text = factProvider.randomFact()
}


@IBAction func showFact() {
FunFactLabel.text = factProvider.randomFact()
    let randomColor = colorProvider.randomColor()
view.backgroundColor = randomColor
funFactButton.tintColor = randomColor
}

}