//
//  TVOverlayAnimationDelegate.h
//  OverlaySegueDemo
//
//  Created by zhoujinrui on 16/3/15.
//  Copyright 漏 2016骞?Maple. All rights reserved.
//

#import <Foundation/Foundation.h>

/**
 * Overlay鍔ㄧ敾浠g悊
 * 鐢眕resented view controller瀹炵幇
 */
@protocol TVOverlayAnimationDelegate <NSObject>

@optional

/// 寮瑰嚭鍔ㄧ敾鍑嗗瀹屾垚
- (void)overlayPresentationTransitionDidPrepare:(id<UIViewControllerContextTransitioning>)context dimmingView:(UIView *)dimmingView;

/// 娑堝け鍔ㄧ敾鍑嗗瀹屾垚
- (void)overlayDismissalTransitionDidPrepare:(id<UIViewControllerContextTransitioning>)context dimmingView:(UIView *)dimmingView;

/**
 * 鑷畾涔夎繃娓″姩鐢? * @warning completion涓€瀹氳鍥炶皟锛屽惁鍒欑晫闈㈠皢鍑虹幇鍋囨
 */
- (void)overlayAnimateTransition:(id<UIViewControllerContextTransitioning>)context completion:(void (^)(BOOL finished))completion;

/// 鑷畾涔夎繃娓″姩鐢绘椂闀?- (NSTimeInterval)overlayTransitionDuration:(id<UIViewControllerContextTransitioning>)context;

/**
 * 濡傛灉瀹炵幇鑷畾涔夎繃娓″姩鐢伙紝鍒欎互涓嬫柟娉曚笉浼氳璋冪敤
 */

/// 寮瑰嚭鍔ㄧ敾灏嗚寮€濮?- (void)overlayPresentationTransitionWillBegin:(id<UIViewControllerContextTransitioning>)context;
/// 寮瑰嚭鍔ㄧ敾鍐呮墽琛?- (void)overlayAnimateAlongsidePresentationTransition:(id<UIViewControllerContextTransitioning>)context;
/// 寮瑰嚭鍔ㄧ敾宸茬粡缁撴潫
- (void)overlayPresentationTransitionDidEnd:(BOOL)completed context:(id<UIViewControllerContextTransitioning>)context;
/// 娑堝け鍔ㄧ敾灏嗚寮€濮?- (void)overlayDismissalTransitionWillBegin:(id<UIViewControllerContextTransitioning>)context;
/// 娑堝け鍔ㄧ敾鍐呮墽琛?- (void)overlayAnimateAlongsideDismissalTransition:(id<UIViewControllerContextTransitioning>)context;
/// 娑堝け鍔ㄧ敾宸茬粡缁撴潫
- (void)overlayDismissalTransitionDidEnd:(BOOL)completed context:(id<UIViewControllerContextTransitioning>)context;

@end
// 鐗堟潈灞炰簬鍘熶綔鑰?// http://code4app.com (cn) http://code4app.net (en)
// 鍙戝竷浠g爜浜庢渶涓撲笟鐨勬簮鐮佸垎浜綉绔? Code4App.com