Last active
August 9, 2018 05:46
-
-
Save gpeal/fb032ca2ee20a3d2541d369101356fca 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
override func itemModel(forDataID dataID: DemoDataID) -> EpoxyableModel? { | |
switch dataID { | |
case .header: | |
return DocumentMarquee.epoxyModel( | |
content: DocumentMarquee.Content(titleText: "Edit Profile"), | |
style: .standard, | |
dataID: DemoDataID.header) | |
case .inputRow: | |
return InputRow.epoxyModel( | |
content: InputRow.Content( | |
titleText: "First name", | |
inputText: firstName) | |
style: .standard, | |
dataID: DemoDataID.inputRow, | |
behaviorSetter: { [weak self] view, content, dataID in | |
view.textDidChangeBlock = { _, inputText in | |
self?.firstName = inputText | |
self?.rebuildItemModel(forDataID: .inputRow) | |
} | |
}) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment