开发者

How can I get my text appended to the placeholder programmatically

开发者 https://www.devze.com 2023-01-04 03:53 出处:网络
I want to add a variable place holder in my textField and when something is written in textField, that text 开发者_如何学JAVAshould be appended to place holder without any change to place holder. How

I want to add a variable place holder in my textField and when something is written in textField, that text 开发者_如何学JAVAshould be appended to place holder without any change to place holder. How should I go about it?


you can do this by using clearsOnBeginEditing property and set it to FALSE.

textField.clearsOnBeginEditing = NO;

If you are creating textfield by interface builder then you have to go to inspector in Interface Builder(Press command 1) and finally you have to uncheck the Clear when editing begins option.

0

精彩评论

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