So here is what we did.
Since the view manager that manages the form table (B) gets -viewDidDisappear , we simply add the view controller (A) as a delegate, which we then manually notify when -viewDidDisappear is called on (B).
The delegate definition is as follows:
@protocol FormSheetViewControllerDelegate
- (void) formSheetViewDidDisappear;
@end
We add a delegate to the FormSheetViewController:
@interface FormSheetViewController
@property (nonatomic, assign) id <FormSheetViewControllerDelegate>
@end
And we call -formSheetViewDidDisappear from FormSheetViewController:
@implementation FormSheetViewController
- (void) viewDidDisappear: (BOOL) animated {
[registerViewControllerDelegate registerViewControllerDidDisappear];
}
@end
PS :. Starting with iOS 5 and blocks, the UIViewController has a method
- (void) dismissViewControllerAnimated: (BOOL) flag completion: (void (^) (void)) completion
What could you use to react to the dismissal of the form sheet form.
source share