I am working on an app which has a button. The button has no text, image or background.
So what I want to do is to give it an image in the viewDidLoad function.
let button = UIButton(type: .Custom) let image = UIImage(named:"redTap")?.imageWithRenderingMode(.AlwaysTemplate) button.setImage(image, forState: .Normal) button.tintColor = UIColor.redColor()