I have an application in which I wanted to change the background image of the text field only when it is selected. Then if it is unselected change back to the previous image ?can anybody help me to achieve 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.
In didBeginEditing Method add this code myTextField.background = [UIImage imageNamed:@”selectedimg.png”]; and on didEndEditing method add the deselected image to the textfield.