酷店

XLPageViewControllerUtil.h 1.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. //
  2. // XLPageViewControllerUtil.h
  3. // XLPageViewControllerExample
  4. //
  5. // Created by MengXianLiang on 2019/5/8.
  6. // Copyright © 2019 jwzt. All rights reserved.
  7. // https://github.com/mengxianliang/XLPageViewController
  8. // 工具类
  9. #import <Foundation/Foundation.h>
  10. #import <UIKit/UIKit.h>
  11. #import "XLPageViewControllerConfig.h"
  12. NS_ASSUME_NONNULL_BEGIN
  13. @interface XLPageViewControllerUtil : NSObject
  14. //文字宽度
  15. + (CGFloat)widthForText:(NSString *)text font:(UIFont *)font size:(CGSize)size;
  16. //颜色过渡
  17. + (UIColor *)colorTransformFrom:(UIColor*)fromColor to:(UIColor *)toColor progress:(CGFloat)progress;
  18. //执行阴影动画
  19. + (void)showAnimationToShadow:(UIView *)shadow shadowWidth:(CGFloat)shadowWidth fromItemRect:(CGRect)fromItemRect toItemRect:(CGRect)toItemRect type:(XLPageShadowLineAnimationType)type progress:(CGFloat)progress;
  20. @end
  21. /**
  22. 兼容子view滚动,添加"让我先滚"属性
  23. */
  24. @interface UIView (LetMeScroll)
  25. /**
  26. 让我先滚 默认 NO
  27. */
  28. @property (nonatomic, assign) BOOL xl_letMeScrollFirst;
  29. @end
  30. NS_ASSUME_NONNULL_END