UIViewExt.h 720 B

1234567891011121314151617181920212223242526272829303132
  1. /*
  2. Erica Sadun, http://ericasadun.com
  3. iPhone Developer's Cookbook, 3.0 Edition
  4. BSD License, Use at your own risk
  5. */
  6. #import <UIKit/UIKit.h>
  7. CGPoint CGRectGetCenter(CGRect rect);
  8. CGRect CGRectMoveToCenter(CGRect rect, CGPoint center);
  9. @interface UIView (ViewFrameGeometry)
  10. @property CGPoint origin;
  11. @property CGSize size;
  12. @property (readonly) CGPoint bottomLeft;
  13. @property (readonly) CGPoint bottomRight;
  14. @property (readonly) CGPoint topRight;
  15. @property CGFloat height;
  16. @property CGFloat width;
  17. @property CGFloat top;
  18. @property CGFloat left;
  19. @property CGFloat bottom;
  20. @property CGFloat right;
  21. - (void) moveBy: (CGPoint) delta;
  22. - (void) scaleBy: (CGFloat) scaleFactor;
  23. - (void) fitInSize: (CGSize) aSize;
  24. @end