Created
September 18, 2015 14:06
-
-
Save 3lvis/0814f6326f05890d47ac to your computer and use it in GitHub Desktop.
Cell.swift
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
import UIKit | |
class SlotCell: UITableViewCell { | |
static let Identifier = "SlotCellIdentifier" | |
override init(style: UITableViewCellStyle, reuseIdentifier: String?) { | |
super.init(style: style, reuseIdentifier: reuseIdentifier) | |
self.contentView.backgroundColor = UIColor(hex: "28C787") | |
} | |
required init?(coder aDecoder: NSCoder) { | |
fatalError("init(coder:) has not been implemented") | |
} | |
var slot: Slot? = nil { | |
didSet { | |
if let slot = slot { | |
self.textLabel?.text = "\(slot.startTime!.description) — \(slot.endTime!.description)" | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment