Created
December 26, 2018 09:14
-
-
Save nathantannar4/0403d3c3c0a290ba37061c93780a0aaa 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 TextFieldCell: RowView<UILabel, TextField, UIView> { | |
var label: UILabel { return leftView } | |
var textField: TextField { return rightView } | |
} | |
class TextViewCell: RowView<UILabel, InputTextView, UIView> { | |
var label: UILabel { return leftView } | |
var textView: InputTextView { return rightView } | |
} | |
class DetailCell<AccessoryViewType: UIView>: RowView<UILabel, UILabel, AccessoryViewType> { | |
var label: UILabel { return leftView } | |
var detailLabel: UILabel { return rightView } | |
} | |
class CheckboxCell: RowView<UILabel, UIView, Checkbox> { | |
var label: UILabel { return leftView } | |
var checkbox: Checkbox { return accessoryView } | |
} | |
class SwitchCell: RowView<UILabel, UILabel, Switch> { | |
var label: UILabel { return leftView } | |
var detailLabel: UILabel { return rightView } | |
var `switch`: Switch { return accessoryView } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment