UIView+HXExtension.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. //
  2. // UIView+HXExtension.h
  3. // HXPhotoPickerExample
  4. //
  5. // Created by Silence on 17/2/16.
  6. // Copyright © 2017年 Silence. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. @class HXPhotoManager;
  10. @interface UIView (HXExtension)
  11. @property (assign, nonatomic) CGFloat hx_x;
  12. @property (assign, nonatomic) CGFloat hx_y;
  13. @property (assign, nonatomic) CGFloat hx_w;
  14. @property (assign, nonatomic) CGFloat hx_h;
  15. @property (assign, nonatomic) CGFloat hx_centerX;
  16. @property (assign, nonatomic) CGFloat hx_centerY;
  17. @property (assign, nonatomic) CGSize hx_size;
  18. @property (assign, nonatomic) CGPoint hx_origin;
  19. /**
  20. 获取当前视图的控制器
  21. @return 控制器
  22. */
  23. - (UIViewController *)hx_viewController;
  24. - (void)hx_showImageHUDText:(NSString *)text;
  25. - (void)hx_showLoadingHUDText:(NSString *)text;
  26. - (void)hx_showLoadingHUDText:(NSString *)text delay:(NSTimeInterval)delay;
  27. - (void)hx_immediatelyShowLoadingHudWithText:(NSString *)text;
  28. - (void)hx_handleLoading;
  29. - (void)hx_handleLoading:(BOOL)animation;
  30. - (void)hx_handleLoading:(BOOL)animation duration:(NSTimeInterval)duration;
  31. - (void)hx_handleImageWithDelay:(NSTimeInterval)delay;
  32. - (void)hx_handleImageWithAnimation:(BOOL)animation;
  33. - (void)hx_handleGraceTimer;
  34. /* <HXAlbumListViewControllerDelegate> */
  35. - (void)hx_presentAlbumListViewControllerWithManager:(HXPhotoManager *)manager delegate:(id)delegate DEPRECATED_MSG_ATTRIBUTE("Use UIViewController+HXEXtension 'hx_presentSelectPhotoControllerWithManager:' instead");
  36. /* <HXCustomCameraViewControllerDelegate> */
  37. - (void)hx_presentCustomCameraViewControllerWithManager:(HXPhotoManager *)manager delegate:(id)delegate DEPRECATED_MSG_ATTRIBUTE("Use UIViewController+HXEXtension 'hx_presentCustomCameraViewControllerWithManager:' instead");
  38. /// 设置圆角。使用自动布局,需要在layoutsubviews 中使用
  39. /// @param radius 圆角尺寸
  40. /// @param corner 圆角位置
  41. - (void)hx_radiusWithRadius:(CGFloat)radius corner:(UIRectCorner)corner;
  42. - (UIImage *)hx_captureImageAtFrame:(CGRect)rect;
  43. - (UIColor *)hx_colorOfPoint:(CGPoint)point;
  44. @end
  45. @interface HXHUD : UIView
  46. @property (assign, nonatomic) BOOL isImage;
  47. @property (copy, nonatomic) NSString *text;
  48. - (instancetype)initWithFrame:(CGRect)frame imageName:(NSString *)imageName text:(NSString *)text;
  49. - (void)showloading;
  50. @end