在IOS开发中常常涉及到frame的修改,但是修改frame有时很烦,所以给UIView添加一个Category,然后添加到pch文件中去,这样就很方便了。.h文件// UIView+Extension.h
#import <UIKit/UIKit.h>
@interface UIView (Extension)
@property (nonatomic, assign) CGFloat x;
@property (nonatomic, assign) CGFloat y;
@property (nonatomic, assign) CGFloat centerX;
@property (nonatomic, assign) CGFloat centerY;
@property (nonatomic, assign) CGFloat width;
@property (nonatomic, assign) CGFloat height;
@property (nonatomic, assign) CGSize size;
@property (nonatomic, assign) CGPoint origin;
@end.m文件// UIView+Extension.m
#import "UIView+Extension.h"
@implementation
...
继续阅读
(16)