Skip to content

Instantly share code, notes, and snippets.

@guojiubo
guojiubo / gist:adff619fdba8f8ba698c
Created Dec 4, 2014
UI_APPEARANCE_SELECTOR in Swift
View gist:adff619fdba8f8ba698c
class CBArticleCellStarView: UIView {
var star: UIImageView = UIImageView(image: UIImage(named: "ArticleUnstarred"))
var starred: Bool = false {
didSet {
self.star.image = self.starred ? UIImage(named: "ArticleStarred") : UIImage(named: "ArticleUnstarred")
}
}