IPhone - End of Animation Detection

How can I determine the end of a modal view animation (when I quit)? (I'm talking about the MFMailComposeViewController, which was not created by me ...)

thank

+3
source share
4 answers

Your modular view controller has a method -viewDidDisappear:that is automatically called whenever the view is removed from the screen. You can override this method in your modular view controller to do whatever you like.

In addition, you might consider using the method -viewDidAppear:in a view controller whose view is detected when your modal view disappears.

+5

MFMailComposeViewController -viewDidDisappear:.

@interface MyCtrler : MFMailComposeViewController
@end
@implementation MyCtrler
-(void)viewDidDisappear:(BOOL)animated {
   [super viewDidDisappear:animated];
   // do anything you like
}
@end
+1

- , , , ( ). viewDidDisappear .

, , NSTimer. , , , , . 300 400 . ( ?)

0
source

Typically, to notify you that animation has completed, you set the delegate by sending setAnimationDelegate: to the UIView class.

When the VC is rejected with [someVC dismissModalViewControllerAnimated:YES], you cannot set the animation delegate, but if you send NO and make your own VC viewing animation, you can set the delegate and receive a notification when the animation is complete.

0
source

Source: https://habr.com/ru/post/1743149/


All Articles