When I click a button Its title should be hide. I do’t want to set the title to empty string @””. So, How can i do this?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Why don’t you want to set the title to an empty string? Simply store the value in a local field and set the button’s title to @”” and everything will be fine.
In your .h:
in your .m:
This way, if you ever need to restore the text of the button, you can do so:
If you want to do this for a bunch of buttons, you could always use an NSDictionary and associate the string values with the buttons.