//
//  UIViewController+GMModelTransitionDelegate.m
//  Gengmei
//
//  Created by wangyang on 2017/9/7.
//  Copyright © 2017年 更美互动信息科技有限公司. All rights reserved.
//

#import "UIViewController+GMModelTransitionDelegate.h"
#import "GMModalFadeInOutAnimator.h"

@implementation UIViewController (GMModelTransitionDelegate)
#pragma mark - UIViewControllerAnimatedTransitioning
- (id<UIViewControllerAnimatedTransitioning>)animationControllerForPresentedController:(UIViewController *)presented presentingController:(UIViewController *)presenting sourceController:(UIViewController *)source {
    GMModalFadeInOutAnimator *animator = [[GMModalFadeInOutAnimator alloc] init];
    animator.isPresented = YES;
    return animator;
}

- (id<UIViewControllerAnimatedTransitioning>)animationControllerForDismissedController:(UIViewController *)dismissed {
    GMModalFadeInOutAnimator *animator = [[GMModalFadeInOutAnimator alloc] init];
    animator.isPresented = NO;
    return animator;
}
@end
