【发布时间】:2020-12-03 01:33:47
【问题描述】:
我正在尝试这样做,以便当我单击一个文本字段并清除它时,我无法单击另一个。我的 TextFieldShouldReturn 函数中有这段代码,但它似乎不起作用。我怎样才能做到这一点,当我点击一个并清除它时,另一个被禁用?尝试制定解决方案。
if widthPer == textField {
heightPer.isUserInteractionEnabled = false
widthPer.isUserInteractionEnabled = true
} else {
heightPer.isUserInteractionEnabled = true
widthPer.isUserInteractionEnabled = false
}
【问题讨论】:
标签: swift xcode uitextfield uitextfielddelegate