No Description

UIView+JZExtension.h 1.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. //
  2. // UIView+LBExtension.h
  3. // XianYu
  4. //
  5. // Created by li bo on 16/5/28.
  6. // Copyright © 2016年 li bo. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. IB_DESIGNABLE
  10. @interface UIView (JZExtension)
  11. @property (nonatomic, assign)CGFloat x;
  12. @property (nonatomic, assign)CGFloat y;
  13. @property (nonatomic, assign)CGFloat width;
  14. @property (nonatomic, assign)CGFloat height;
  15. @property (nonatomic, assign)CGFloat centerX;
  16. @property (nonatomic, assign)CGFloat centerY;
  17. @property (nonatomic, assign)CGSize size;
  18. @property(nonatomic, assign) IBInspectable CGFloat borderWidth;
  19. @property(nonatomic, assign) IBInspectable UIColor *borderColor;
  20. @property(nonatomic, assign) IBInspectable CGFloat cornerRadius;
  21. /**
  22. * 水平居中
  23. */
  24. - (void)alignHorizontal;
  25. /**
  26. * 垂直居中
  27. */
  28. - (void)alignVertical;
  29. /**
  30. * 判断是否显示在主窗口上面
  31. *
  32. * @return 是否
  33. */
  34. - (BOOL)isShowOnWindow;
  35. - (UIViewController *)parentController;
  36. - (void)addCornerRadiusByRoundingCorners:(UIRectCorner)corners cornerRadii:(CGSize)cornerRadii;
  37. @end