• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to force reload of a subview when a button is clicked.

 
rsheyeah hussain
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


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.

How do I achieve this.

Here is my code snippets:







Thanks for your time.

 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

Mark
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic