In my modal view controller, I have a button processing method that includes
[self dismissModalViewControllerAnimated: YES]
In the view view controller, I override the offsetModalViewControllerAnimated function as follows:
-(void) dismissModalViewControllerAnimated: (BOOL)animated { NSLog(@"dismiss"); [super dismissModalViewControllerAnimated: animated]; }
When this button is pressed, the button processing method is called, but rejecting the offsetModalViewControllerAnimated: override function does not cause a call: NSLog (@ "termination"); the statement is not called, and the breakpoint inside the method does not fall.
I tried
[[self presentingViewController] dismissModalViewControllerAnimated: YES];
but that didn't work either. However, the modal view manager is rejected.
Any idea what could be wrong?
ios uikit uiviewcontroller modal-dialog
StephenAshley.developer
source share