How to determine which textfield is active swift

前端 未结 7 1721
太阳男子
太阳男子 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 04:59

    I wrote a library to handle basic Form Creation Swift Pop Form. It doesn't use tags but rather sets a datasource that contains fields and uses indexPathForCell to query which is the active textfield. Check out the source code for more!

提交回复
热议问题