Created
May 3, 2017 19:32
-
-
Save catqbat/dff664afc2cd502268d5667e21ac4627 to your computer and use it in GitHub Desktop.
This file contains 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
class LocationCell : UICollectionViewCell | |
{ | |
@IBOutlet weak var locationNameLabel: UILabel!; | |
static let locationNameFont:UIFont = UIFont.systemFont(ofSize: 17, weight: UIFontWeightThin); | |
var locationName: String | |
{ | |
didSet | |
{ | |
locationNameLabel.text = locationName; | |
} | |
} | |
override var isSelected: Bool | |
{ | |
didSet | |
{ | |
locationNameLabel.textColor = isSelected ? UIColor.yellow : UIColor.white; | |
} | |
} | |
required init?(coder aDecoder: NSCoder) | |
{ | |
self.locationName = ""; | |
super.init(coder: aDecoder); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment