joelarcos
1/16/2018 - 6:50 PM

random color generator

random color generator

     //custom function to generate a random UIColor
    func randomColor() -> UIColor {
        let red = CGFloat(drand48())
        let green = CGFloat(drand48())
        let blue = CGFloat(drand48())
        return UIColor(red: red, green: green, blue: blue, alpha: 1.0)
    }