Skip to content

Instantly share code, notes, and snippets.

@guojiubo
guojiubo / gist:adff619fdba8f8ba698c
Created December 4, 2014 02:24
UI_APPEARANCE_SELECTOR in Swift
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")
}
}