From 8d93111448cacaac77b80a8ef21d6dc1d980ac3d Mon Sep 17 00:00:00 2001 From: Zach Smith Date: Thu, 12 Mar 2015 11:08:31 -0700 Subject: [PATCH] Fixed Button image --- AwfulBindingUI/BindableButton.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AwfulBindingUI/BindableButton.swift b/AwfulBindingUI/BindableButton.swift index 72a4bbe..ea05093 100644 --- a/AwfulBindingUI/BindableButton.swift +++ b/AwfulBindingUI/BindableButton.swift @@ -56,8 +56,8 @@ public class BindableButton:UIButton{ self.hidden = newValue } + //TODO: segment by control state private var _imageBinding:BindableValue? - public var imageBinding:BindableValue?{ get{ return _imageBinding @@ -73,6 +73,6 @@ public class BindableButton:UIButton{ } private func imageBinding_valueChanged(newValue:UIImage?){ - self.imageView?.image = newValue + self.setImage(newValue, forState: UIControlState.Normal) } } \ No newline at end of file