main thread update
access modifier update
This commit is contained in:
parent
767ee787cb
commit
1d843ae29a
@ -46,7 +46,7 @@ public class MFTextFieldListView: ViewConstrainingView {
|
|||||||
var viewList: [UIView] = []
|
var viewList: [UIView] = []
|
||||||
|
|
||||||
for textFieldMap in textFieldMapList {
|
for textFieldMap in textFieldMapList {
|
||||||
if let textField = MFTextField(map: textFieldMap, bothDelegates: self) {
|
if let textField = getTextFieldForMap(textFieldMap) {
|
||||||
|
|
||||||
if textFieldMap.boolForKey("required") {
|
if textFieldMap.boolForKey("required") {
|
||||||
textFieldsToValidate.append(textField)
|
textFieldsToValidate.append(textField)
|
||||||
@ -76,13 +76,25 @@ public class MFTextFieldListView: ViewConstrainingView {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public func getTextParamsList() -> [String: Any] {
|
public func getTextParamsList() -> [String: Any] {
|
||||||
var extraParam: [String: Any] = [:]
|
return DispatchQueue.main.sync {
|
||||||
for textField in textFields {
|
var extraParam: [String: Any] = [:]
|
||||||
if let fieldKey = textField.fieldKey {
|
for textField in textFields {
|
||||||
extraParam[fieldKey as String] = textField.text ?? ""
|
if let fieldKey = textField.fieldKey {
|
||||||
|
extraParam[fieldKey as String] = textField.text ?? ""
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
return extraParam
|
||||||
}
|
}
|
||||||
return extraParam
|
}
|
||||||
|
|
||||||
|
private func getTextFieldForMap(_ map: [String: Any]) -> MFTextField? {
|
||||||
|
if map.boolForKey("dropDown") {
|
||||||
|
let dropDownFld = DropDown(map: map, bothDelegates: self)
|
||||||
|
dropDownFld?.setWithJSON(map, delegateObject: parentViewContoller?.delegateObject() as? MVMCoreUIDelegateObject, additionalData: nil)
|
||||||
|
dropDownFld?.showDropDown(true)
|
||||||
|
return dropDownFld
|
||||||
|
}
|
||||||
|
return MFTextField(map: map, bothDelegates: self)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -8,26 +8,26 @@
|
|||||||
|
|
||||||
import UIKit
|
import UIKit
|
||||||
|
|
||||||
public class TextFieldListFormViewController: TopLabelsAndBottomButtonsViewController {
|
open class TextFieldListFormViewController: TopLabelsAndBottomButtonsViewController {
|
||||||
|
|
||||||
|
|
||||||
public var textFieldListView: MFTextFieldListView?
|
public var textFieldListView: MFTextFieldListView?
|
||||||
|
|
||||||
public override func viewDidLoad() {
|
open override func viewDidLoad() {
|
||||||
super.viewDidLoad()
|
super.viewDidLoad()
|
||||||
// Do any additional setup after loading the view.
|
// Do any additional setup after loading the view.
|
||||||
}
|
}
|
||||||
|
|
||||||
public override func updateViews() {
|
open override func updateViews() {
|
||||||
super.updateViews()
|
super.updateViews()
|
||||||
}
|
}
|
||||||
|
|
||||||
public override func newDataBuildScreen() {
|
open override func newDataBuildScreen() {
|
||||||
super.newDataBuildScreen()
|
super.newDataBuildScreen()
|
||||||
topLabelsView?.separatorView?.isHidden = true
|
topLabelsView?.separatorView?.isHidden = true
|
||||||
}
|
}
|
||||||
|
|
||||||
public override func buildViewsBetweenLabelsAndButtons() -> [UIView]? {
|
open override func buildViewsBetweenLabelsAndButtons() -> [UIView]? {
|
||||||
var viewList: [UIView] = []
|
var viewList: [UIView] = []
|
||||||
|
|
||||||
if let textFieldsList = loadObject?.pageJSON?.arrayForKey("textFieldList") as? [[String: Any]] {
|
if let textFieldsList = loadObject?.pageJSON?.arrayForKey("textFieldList") as? [[String: Any]] {
|
||||||
@ -40,12 +40,12 @@ public class TextFieldListFormViewController: TopLabelsAndBottomButtonsViewContr
|
|||||||
return viewList
|
return viewList
|
||||||
}
|
}
|
||||||
|
|
||||||
public override func handleOpenPage(for requestParameters: MVMCoreRequestParameters, actionInformation: [AnyHashable : Any]?, additionalData: [AnyHashable : Any]?) {
|
open override func handleOpenPage(for requestParameters: MVMCoreRequestParameters, actionInformation: [AnyHashable : Any]?, additionalData: [AnyHashable : Any]?) {
|
||||||
textFieldListView?.addParams(requestParameters: requestParameters)
|
textFieldListView?.addParams(requestParameters: requestParameters)
|
||||||
super.handleOpenPage(for: requestParameters, actionInformation: actionInformation, additionalData: additionalData)
|
super.handleOpenPage(for: requestParameters, actionInformation: actionInformation, additionalData: additionalData)
|
||||||
}
|
}
|
||||||
|
|
||||||
public override func spaceAboveBetweenView() -> NSNumber? {
|
open override func spaceAboveBetweenView() -> NSNumber? {
|
||||||
return PaddingFour as NSNumber
|
return PaddingFour as NSNumber
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user