Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if let emoji = emoji {
- symbolTextField.text = emoji.symbol
- nameTextField.text = emoji.name
- descriptionTextField.text = emoji.description
- usageTextField.text = emoji.usage
- title = "Edit Emoji"
- } else {
- title = "Add Emoji"
- }
- updateSaveButtonState()
- func updateSaveButtonState() {
- let symbolText = symbolTextField.text ?? ""
- let nameText = nameTextField.text ?? ""
- let descriptionText = descriptionTextField.text ?? ""
- let usageText = usageTextField.text ?? ""
- saveButton.isEnabled = !symbolText.isEmpty && !nameText.isEmpty && !descriptionText.isEmpty && !usageText.isEmpty
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement