2 // ZFModalTransitionAnimator.h
4 // Created by Amornchai Kanokpullwad on 5/10/14.
5 // Copyright (c) 2014 zoonref. All rights reserved.
8 #import <Foundation/Foundation.h>
9 #import <UIKit/UIKit.h>
10 #import <UIKit/UIGestureRecognizerSubclass.h>
12 typedef NS_ENUM(NSUInteger, ZFModalTransitonDirection) {
13 ZFModalTransitonDirectionBottom,
14 ZFModalTransitonDirectionLeft,
15 ZFModalTransitonDirectionRight,
18 @interface ZFDetectScrollViewEndGestureRecognizer : UIPanGestureRecognizer
19 @property (nonatomic, weak) UIScrollView *scrollview;
22 @interface ZFModalTransitionAnimator : UIPercentDrivenInteractiveTransition <UIViewControllerAnimatedTransitioning, UIViewControllerTransitioningDelegate, UIGestureRecognizerDelegate>
24 @property (nonatomic, assign, getter=isDragable) BOOL dragable;
25 @property (nonatomic, readonly) ZFDetectScrollViewEndGestureRecognizer *gesture;
26 @property (nonatomic, assign) UIGestureRecognizer *gestureRecognizerToFailPan;
27 @property BOOL bounces;
28 @property (nonatomic) ZFModalTransitonDirection direction;
29 @property CGFloat behindViewScale;
30 @property CGFloat behindViewAlpha;
31 @property CGFloat transitionDuration;
33 - (id)initWithModalViewController:(UIViewController *)modalViewController;
34 - (void)setContentScrollView:(UIScrollView *)scrollView;