I have a favorite image to display on a UIBarButtonItem, on an toolbar.
How do you do to change it when this item is unselected/selected? like this screenshot:

Thanks!
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.
You can make two arrays with UIBarButtonItems: one with the first image and one with the second image. Like this:
and then switch between the two sets of toolbar items with:
If you have more than just the one button on your toolbar then just add the rest of the items to both arrays.