How to force reload of a subview when a button is clicked.
rsheyeah hussain
Greenhorn
Joined: Jan 10, 2010
Posts: 11
posted
0
I want to force reload of the subview so I can display all the selected images.?
On clicking the Select All button, I would like to be able to reload the entire view and pass in a boolean value that lets me display a tick mark over all the images.
Well you can always send a message to set the should update view variable, which is in any UIView object. I forget the exact method call, but you can use XCode and CTRL-. to get a popup of all the methods available to call.
Or you could take a complete different approach where you use either KVO Key Value Observer pattern to the button when touched. Or you could have a UINotification sent and have all the images registered to receive that notification and then update themselves.
I have had buttons change the screens without ever having to send the message that UIView should redisplay. It happens automatically if you change the appearance of any UIView object on the UIScreen.
Yeah, looking at your code in your other post. If you just loop through your assets and call the checked method that you wrote that updates the UIView of that asset, then it should automatically update your screen.