Created
August 22, 2015 23:00
-
-
Save RyanBreaker/6cbb9e4f286fa57a9fb2 to your computer and use it in GitHub Desktop.
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 TableCell : UITableViewCell { | |
private(set) var textField: UITextField? = nil | |
override var textLabel: UILabel? { get { | |
return nil | |
}} | |
private func addTextField() { | |
textField = UITextField(frame: layer.bounds) | |
contentView.addSubview(textField!) | |
} | |
override init(style: UITableViewCellStyle, reuseIdentifier: String?) { | |
super.init(style: style, reuseIdentifier: reuseIdentifier) | |
addTextField() | |
} | |
required init?(coder aDecoder: NSCoder) { | |
super.init(coder: aDecoder) | |
addTextField() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment