How do I know when the view got closed? Am currently using the delegate pattern, capture viewDidDisappear to fire the event… Is this the correct one to use? Downside of viewDidDisappear is that when my view move to a sub-view the event still fires.
Its a custom view that i made that exptend UITableViewController… In that table you got a list of options that you manage, so when moving between those screens I don’t want my event to fire.. I only want it to fire when I close the actual view.
now just see when your
UITableViewbegin open at that time you set the bool value like…first define this variable global in your .h file like bellow
and after that in your .m file
set yes when your tableview is open with button tap event or anything else which you used…
after when your pop-up view or UITableview closed at that time set value
NOlikeand check in your
viewDidDisappear:that ifisTableOpenis true then do nothing otherwise yes…i hope this help you or get some Idea ..
🙂