UIViewExt

来源:互联网 发布:爱趣彩 可以网络购彩 编辑:程序博客网 时间:2024/04/29 06:46

此框架是为了方面定位坐标所用,具体方法如下:

@interface UIView (ViewFrameGeometry)

@propertyCGPoint origin;

@property CGSize size;


@property (readonly)CGPoint bottomLeft;

@property (readonly)CGPoint bottomRight;

@property (readonly)CGPoint topRight;


@propertyCGFloat height;

@property CGFloat width;


@property CGFloat top;

@property CGFloat left;


@propertyCGFloat bottom;

@property CGFloat right;


- (void) moveBy: (CGPoint) delta;

- (void) scaleBy: (CGFloat) scaleFactor;

- (void) fitInSize: (CGSize) aSize;

@end


0 0