Skip to content

Instantly share code, notes, and snippets.

@openopen114
Last active June 27, 2016 04:01
Show Gist options
  • Save openopen114/e865aafe100b2b2b36579bd68ff50596 to your computer and use it in GitHub Desktop.
Save openopen114/e865aafe100b2b2b36579bd68ff50596 to your computer and use it in GitHub Desktop.
//UIButton
@IBOutlet weak var roofBtn: UIButton!
override func viewDidLoad() {
super.viewDidLoad()
checkBoxBtnInit()
}
// check button init
func checkBoxBtnInit(){
let closeImage = UIImage(named:"ic_radio_button_checked")?.imageWithRenderingMode(
UIImageRenderingMode.AlwaysTemplate)
roofBtn.tintColor = UIColor(red:0.13, green:0.59, blue:0.95, alpha:1.0) //set tint color
roofBtn.setImage(closeImage, forState:UIControlState.Normal) //set image to UIButton
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment