DKAnimationBaseView.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. //
  2. // ZLAnimationBaseView.h
  3. // ZLAssetsPickerDemo
  4. //
  5. //
  6. #import <UIKit/UIKit.h>
  7. typedef void(^complation)();
  8. @class DKAnimationBaseView;
  9. // 开始坐标 default 0,0
  10. static NSString *const UIViewAnimationStartFrame = @"UIViewAnimationStartFrame";
  11. // 结束坐标 默认屏幕高宽度
  12. static NSString *const UIViewAnimationEndFrame = @"UIViewAnimationEndFrame";
  13. // 动画时间 default 0.5
  14. static NSString *const UIViewAnimationDuration = @"UIViewAnimationDuration";
  15. /** 系统参数配置 */
  16. // 父View
  17. static NSString *const UIViewAnimationInView = @"UIViewAnimationInView";
  18. // 当前View(非外面传入, 用于继承)
  19. static NSString *const UIViewAnimationSelfView = @"UIViewAnimationSelfView";
  20. // 点击的View
  21. static NSString *const UIViewAnimationToView = @"UIViewAnimationToView";
  22. // 来自那个根视图点击的View
  23. static NSString *const UIViewAnimationFromView = @"UIViewAnimationFromView";
  24. static NSString *const UIViewAnimationNavigationHeight = @"UIViewAnimationNavigationHeight";
  25. /** 类型参数配置 */
  26. // indexPath
  27. static NSString *const UIViewAnimationTypeViewWithIndexPath = @"UIViewAnimationTypeViewWithIndexPath";
  28. // 动画参数
  29. static NSString *const UIViewAnimationAnimationStatusType = @"UIViewAnimationAnimationStatus";
  30. static complation _completionBlock;
  31. @interface DKAnimationBaseView : UIView
  32. + (instancetype) sharedManager;
  33. /**
  34. * 开始动画
  35. *
  36. * @param animations 开始动画
  37. * @param options 动画参数
  38. * @param completion 结束动画
  39. */
  40. + (instancetype) animationViewWithOptions:(NSDictionary *)options animations:(void(^)())animations completion:(void (^)(DKAnimationBaseView *baseView)) completion;
  41. // 还原动画
  42. + (void) restoreAnimation:(void(^)()) completion;
  43. + (void) restoreWithOptions:(NSDictionary *)options animation:(void(^)()) completion;
  44. // 遍历view的父节点是不是TableViewCell 或者 UICollectionCell
  45. + (UIView *)traversalViewWithCell:(UIView *)view;
  46. // 当前是第几页第几组
  47. + (void)setCurrentIndexPath:(NSIndexPath *)indexPath;
  48. + (NSIndexPath *)currentIndexPath;
  49. // 准备开始动画前的操作
  50. + (void) willStartAnimationOperation;
  51. // 准备结束动画
  52. + (void) willUnLoadAnimationOperation;
  53. // 结束动画的操作
  54. + (void) unLoadStopAnimationOperation;
  55. + (void)setterParamsWithOrientation:(UIDevice *)device;
  56. @end