How to determine which textfield is active swift

前端 未结 7 1717
太阳男子
太阳男子 2020-12-06 04:01

I cant figure out which UITextField is currently active so i can clear its text if they hit cancel on a UIBarButtonItem. Here is my code. There is

相关标签:
7条回答
  • 2020-12-06 05:04

    you can assign a tag to all your text feild and in textFieldDidBeginEditing check your current textFeild.tag and it's clear witch textfeild is in use .

    0 讨论(0)
提交回复
热议问题