I have an UIImageView set as the background to a custom cell (prototype cell) .How can I change the image in the image view , when the cell is selected?
I have an UIImageView set as the background to a custom cell (prototype cell)
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.
If you want to change the image of the imageview on cell selection then you will need to do it in delegate method of tableview here:
If you have a custom cell and you have set its background as an image view then you must also create its property in custom cell’s class and change the image of the image view through that property in the mentioned delegate.