is there something that can call a -(void) every time a view shows.
I am rotating between two views, so when i go to the second view and then return to the first view I want a void to be called automatically from the first view
I’ve try to do this with -(void)viewWillAppear:(BOOL)animated and – (void)viewDidLoad
by putting a NSLog in them but it doesn’t print when i return to the first view.
any suggestions?
is there something that can call a -(void) every time a view shows. I
Share
If you are updating the first view with data from the second, use an observer on the model that is being updated. If the second view is being removed as a subview, you can observe the subviews. Alternatively, you can use a block callback closure.
In the interface:
and:
In the method that closes your second view:
And finally to define it from your first view: