UIView+NIM.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. //
  2. // UIView+NIM.h
  3. // NIMKit
  4. //
  5. // Created by chris.
  6. // Copyright (c) 2015年 NetEase. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. @interface UIView (NIMKit)
  10. @property (nonatomic) CGFloat nim_left;
  11. /**
  12. * Shortcut for frame.origin.y
  13. *
  14. * Sets frame.origin.y = top
  15. */
  16. @property (nonatomic) CGFloat nim_top;
  17. /**
  18. * Shortcut for frame.origin.x + frame.size.width
  19. *
  20. * Sets frame.origin.x = right - frame.size.width
  21. */
  22. @property (nonatomic) CGFloat nim_right;
  23. /**
  24. * Shortcut for frame.origin.y + frame.size.height
  25. *
  26. * Sets frame.origin.y = bottom - frame.size.height
  27. */
  28. @property (nonatomic) CGFloat nim_bottom;
  29. /**
  30. * Shortcut for frame.size.width
  31. *
  32. * Sets frame.size.width = width
  33. */
  34. @property (nonatomic) CGFloat nim_width;
  35. /**
  36. * Shortcut for frame.size.height
  37. *
  38. * Sets frame.size.height = height
  39. */
  40. @property (nonatomic) CGFloat nim_height;
  41. /**
  42. * Shortcut for center.x
  43. *
  44. * Sets center.x = centerX
  45. */
  46. @property (nonatomic) CGFloat nim_centerX;
  47. /**
  48. * Shortcut for center.y
  49. *
  50. * Sets center.y = centerY
  51. */
  52. @property (nonatomic) CGFloat nim_centerY;
  53. /**
  54. * Shortcut for frame.origin
  55. */
  56. @property (nonatomic) CGPoint nim_origin;
  57. /**
  58. * Shortcut for frame.size
  59. */
  60. @property (nonatomic) CGSize nim_size;
  61. //找到自己的vc
  62. - (UIViewController *)nim_viewController;
  63. @end