12345678910111213141516171819202122232425262728293031323334353637 |
- //
- // TYBaseAnimation.h
- // TYAlertControllerDemo
- //
- // Created by SunYong on 15/9/1.
- // Copyright (c) 2015年 tanyang. All rights reserved.
- //
- #import <UIKit/UIKit.h>
- #import "TYAlertController.h"
- @interface TYBaseAnimation : NSObject<UIViewControllerAnimatedTransitioning>
- @property (nonatomic, assign, readonly) BOOL isPresenting; // present . dismiss
- + (instancetype)alertAnimationIsPresenting:(BOOL)isPresenting;
- // if you only want alert or actionsheet style ,you can judge that you don't need and return nil
- // code : only support alert style
- // if (preferredStyle == TYAlertControllerStyleAlert) {
- // return [super alertAnimationIsPresenting:isPresenting];
- // }
- // return nil;
- + (instancetype)alertAnimationIsPresenting:(BOOL)isPresenting preferredStyle:(TYAlertControllerStyle) preferredStyle;
- // override transiton time
- - (NSTimeInterval)transitionDuration:(id<UIViewControllerContextTransitioning>)transitionContext;
- // override present
- - (void)presentAnimateTransition:(id<UIViewControllerContextTransitioning>)transitionContext;
- // override dismiss
- - (void)dismissAnimateTransition:(id<UIViewControllerContextTransitioning>)transitionContext;
- @end
|