ios - Event for when a view is no longer on top of the view stack -


is there way tell when view no longer on top of view stack? example modal view gets pushed on top of view stack?

so have view table view, , there events cause modals shown. when modal dismissed want reload data in table.

is there event can subscribe achieve this? maybe possible kvo?

you can use nsnotification system.

in uitableviewcontroller register nsnotification (let's assume nsstring *notifname = @"dismissmv"):

    [[nsnotificationcenter defaultcenter] addobserver:self selector:@selector(hasdismissed:) notifname object:nil]; 

and implement

-(void)hasdismissed:(nsnotification *)notification 

then when dismiss viewcontroller you'll post notification:

    [self dismissviewcontrolleranimated:true completion:^{[[nsnotificationcenter defaultcenter] postnotificationname:notifname object:nil];}]; 

Comments

Popular posts from this blog

php - Submit Form Data without Reloading page -

linux - Rails running on virtual machine in Windows -