I need to check if viewWillDisappear:
is called because I am presenting another UIViewController
as modal or not. Does anyone know if this is possible?
UPDATE
I want to know why it is being called. For example, if its being popped or if another viewcontroller
is shown as modal. I need to differentiate the both.
This is only a partial answer to your question, but have a look at "Determining Why a View’s Appearance Changed" in the "View Controller Programming Guide for iOS".
For example, you can call [self isBeingDismissed]
from within viewWillDisappear
to determine if the view controller was just dismissed (e.g. popped from the navigation stack).
You can set a breakpoint in that method or do NSlog(@"ViewwillDisapper"); So, you can verify whether that method is calling or not.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With