You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

58 lines
1.1 KiB

//
// Distribution
//
// Created by YJYH on 16/7/1.
// Copyright © 2016年 YJYH. 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;
@property CGFloat centerX;
@property CGFloat centerY;
- (void) moveBy: (CGPoint) delta;
- (void) scaleBy: (CGFloat) scaleFactor;
- (void) fitInSize: (CGSize) aSize;
// 设置UIView的X
- (void)setViewX:(CGFloat)newX;
// 设置UIView的Y
- (void)setViewY:(CGFloat)newY;
// 设置UIView的Origin
- (void)setViewOrigin:(CGPoint)newOrigin;
// 设置UIView的width
- (void)setViewWidth:(CGFloat)newWidth;
// 设置UIView的height
- (void)setViewHeight:(CGFloat)newHeight;
// 设置UIView的Size
- (void)setViewSize:(CGSize)newSize;
@end