Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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