酷店

UIView+JZExtension.h 1.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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)CGFloat bottom;
  19. @property (nonatomic, assign) CGFloat right;
  20. @property(nonatomic, assign) IBInspectable CGFloat borderWidth;
  21. @property(nonatomic, assign) IBInspectable UIColor *borderColor;
  22. @property(nonatomic, assign) IBInspectable CGFloat cornerRadius;
  23. /**
  24. * 水平居中
  25. */
  26. - (void)alignHorizontal;
  27. /**
  28. * 垂直居中
  29. */
  30. - (void)alignVertical;
  31. /**
  32. * 判断是否显示在主窗口上面
  33. *
  34. * @return 是否
  35. */
  36. - (BOOL)isShowOnWindow;
  37. - (UIViewController *)parentController;
  38. - (void)addCornerRadiusByRoundingCorners:(UIRectCorner)corners cornerRadii:(CGSize)cornerRadii;
  39. // 弹窗的缩放动画
  40. - (void)addKeyAnimation;
  41. @end