YBIBAnimatedTransition.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. //
  2. // YBIBAnimatedTransition.h
  3. // YBImageBrowserDemo
  4. //
  5. // Created by 波儿菜 on 2019/6/6.
  6. // Copyright © 2019 波儿菜. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. NS_ASSUME_NONNULL_BEGIN
  10. @protocol YBIBAnimatedTransition <NSObject>
  11. @required
  12. - (void)yb_showTransitioningWithContainer:(UIView *)container startView:(nullable __kindof UIView *)startView startImage:(nullable UIImage *)startImage endFrame:(CGRect)endFrame orientation:(UIDeviceOrientation)orientation completion:(void(^)(void))completion;
  13. - (void)yb_hideTransitioningWithContainer:(UIView *)container startView:(nullable __kindof UIView *)startView endView:(UIView *)endView orientation:(UIDeviceOrientation)orientation completion:(void(^)(void))completion;
  14. @end
  15. typedef NS_ENUM(NSInteger, YBIBTransitionType) {
  16. /// 无动效
  17. YBIBTransitionTypeNone,
  18. /// 渐隐
  19. YBIBTransitionTypeFade,
  20. /// 连贯移动
  21. YBIBTransitionTypeCoherent
  22. };
  23. @interface YBIBAnimatedTransition : NSObject <YBIBAnimatedTransition>
  24. /// 入场动效类型
  25. @property (nonatomic, assign) YBIBTransitionType showType;
  26. /// 出场动效类型
  27. @property (nonatomic, assign) YBIBTransitionType hideType;
  28. /// 入场动效持续时间
  29. @property (nonatomic, assign) NSTimeInterval showDuration;
  30. /// 出场动效持续时间
  31. @property (nonatomic, assign) NSTimeInterval hideDuration;
  32. @end
  33. NS_ASSUME_NONNULL_END