iPhone - Detect the end of the animation

后端 未结 4 903
走了就别回头了
走了就别回头了 2021-01-21 05:21

How can I detect the end of the animation of a modal view (when I do a dismiss)? (I\'m talking about MFMailComposeViewController which is not created by myself...)

Thank

4条回答
  •  野的像风
    2021-01-21 05:57

    Normally to be notified when an animation is complete you set a delegate by sending setAnimationDelegate: to the UIView class.

    When a VC is dismissed using [someVC dismissModalViewControllerAnimated:YES] you can't set the animation delegate, but if you send NO instead and do your own animation of the VC's view you can set the delegate and be notified when the animation is completed.

提交回复
热议问题