35 lines
747 B
C
35 lines
747 B
C
|
|
//
|
||
|
|
// ViewFrameGeometry.h
|
||
|
|
// 君分时代
|
||
|
|
//
|
||
|
|
// Created by 贠小飞 on 2018/4/10.
|
||
|
|
// Copyright © 2018年 贠小飞. All rights reserved.
|
||
|
|
//
|
||
|
|
|
||
|
|
#import <UIKit/UIKit.h>
|
||
|
|
|
||
|
|
CGPoint CGRectGetCenter(CGRect rect);
|
||
|
|
CGRect CGRectMoveToCenter(CGRect rect, CGPoint center);
|
||
|
|
|
||
|
|
@interface UIView (ViewFrameGeometry)
|
||
|
|
@property CGPoint origin;
|
||
|
|
@property CGSize size;
|
||
|
|
|
||
|
|
@property (readonly) CGPoint bottomLeft;
|
||
|
|
@property (readonly) CGPoint bottomRight;
|
||
|
|
@property (readonly) CGPoint topRight;
|
||
|
|
|
||
|
|
@property CGFloat height;
|
||
|
|
@property CGFloat width;
|
||
|
|
|
||
|
|
@property CGFloat top;
|
||
|
|
@property CGFloat left;
|
||
|
|
|
||
|
|
@property CGFloat bottom;
|
||
|
|
@property CGFloat right;
|
||
|
|
|
||
|
|
- (void) moveBy: (CGPoint) delta;
|
||
|
|
- (void) scaleBy: (CGFloat) scaleFactor;
|
||
|
|
- (void) fitInSize: (CGSize) aSize;
|
||
|
|
@end
|