Last active
November 19, 2015 03:37
-
-
Save ctrevarthen/ece20a5816ff240d31a0 to your computer and use it in GitHub Desktop.
ShopQuick - Shopping List Manager - Is Favorited?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func leftButtonsForProduct(product: Product) -> [UIButton] { | |
let buttons : NSMutableArray = NSMutableArray() | |
if self.favoritesManager.isProductFavorited(product) { | |
buttons.sw_addUtilityButtonWithColor(UIColor(red: 224/255, green: 224/255, blue: 103/255, alpha: 1), title: "Faved") | |
} | |
else { | |
buttons.sw_addUtilityButtonWithBackgroundColor(UIColor.whiteColor(), title: "Fav", titleColor: UIColor.blackColor()) | |
} | |
buttons.sw_addUtilityButtonWithColor(UIColor(red: 14/255, green: 132/255, blue: 37/255, alpha: 1), title: "$") | |
return buttons as NSArray as! [UIButton] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment