moved code. changed options

This commit is contained in:
Kevin G Christiano 2020-04-20 16:26:42 -04:00
parent c8f0341e4c
commit c8b4eaac06
3 changed files with 6 additions and 8 deletions

View File

@ -105,11 +105,11 @@ import Foundation
try container.encodeIfPresent(title, forKey: .title)
try container.encodeIfPresent(feedback, forKey: .feedback)
try container.encodeIfPresent(text, forKey: .text)
try container.encodeIfPresent(fieldKey, forKey: .fieldKey)
try container.encodeIfPresent(groupName, forKey: .groupName)
try container.encodeIfPresent(locked, forKey: .locked)
try container.encodeIfPresent(selected, forKey: .selected)
try container.encodeIfPresent(errorMessage, forKey: .errorMessage)
try container.encode(enabled, forKey: .enabled)
try container.encodeIfPresent(fieldKey, forKey: .fieldKey)
try container.encodeIfPresent(groupName, forKey: .groupName)
}
}

View File

@ -35,9 +35,7 @@
try super.init(from: decoder)
let typeContainer = try decoder.container(keyedBy: CodingKeys.self)
if let options = try typeContainer.decodeIfPresent([String].self, forKey: .options) {
self.options = options
}
options = try typeContainer.decode([String].self, forKey: .options)
if let selectedIndex = try typeContainer.decodeIfPresent(Int.self, forKey: .selectedIndex) {
self.selectedIndex = selectedIndex

View File

@ -214,9 +214,9 @@ import UIKit
}
open func setupTextFieldToolbar() {
textField.inputAccessoryView = UIToolbar.getToolbarWithDoneButton(delegate: observingTextFieldDelegate ?? self,
action: #selector(observingTextFieldDelegate?.dismissFieldInput))
let observingDelegate = observingTextFieldDelegate ?? self
textField.inputAccessoryView = UIToolbar.getToolbarWithDoneButton(delegate: observingDelegate,
action: #selector(observingDelegate.dismissFieldInput))
}
//--------------------------------------------------