草庐IT

frequencyField

全部标签

ios - 仅当所有文本字段都已填写时才在 Swift 中启用按钮

我无法弄清楚如何更改我的代码以使其在我的三个文本字段填写完毕后启用导航栏中的“完成”按钮。我目前有三个UITextField和一个UIButtonItem。habitNameField和goalField都是手动文本字段,frequencyField是一个PickerView。@IBOutletweakvarhabitNameField:UITextField!@IBOutletweakvargoalField:UITextField!@IBOutletweakvarfrequencyField:UITextField!@IBOutletweakvardoneBarButton:UIB

ios - 仅当所有文本字段都已填写时才在 Swift 中启用按钮

我无法弄清楚如何更改我的代码以使其在我的三个文本字段填写完毕后启用导航栏中的“完成”按钮。我目前有三个UITextField和一个UIButtonItem。habitNameField和goalField都是手动文本字段,frequencyField是一个PickerView。@IBOutletweakvarhabitNameField:UITextField!@IBOutletweakvargoalField:UITextField!@IBOutletweakvarfrequencyField:UITextField!@IBOutletweakvardoneBarButton:UIB