开发者

Unusual behaviour of text field .Clear text field data on click event of button

开发者 https://www.devze.com 2023-02-17 11:43 出处:网络
When user click on button , I want to clear text field. How can i do this? My code is as follows => textFieldName.tex开发者_如何学JAVAt = nil;

When user click on button , I want to clear text field. How can i do this?

My code is as follows =>

textFieldName.tex开发者_如何学JAVAt = nil;
textViewAddress.text = nil;

But this code is not clearing the text field, but it clears the textView. Also when i use backspace button from keyboard of iphone it is not clearing textfield. If i write something in textfield it starts writing on top of existing characters.

Please help me friends. Thanks


Maybe this would be sufficient

textFieldName.text = @"";
textViewAddress.text = @"";
0

精彩评论

暂无评论...
验证码 换一张
取 消