// // UIView+LayoutMethods.h // TmallClient4iOS-Prime // // Created by casa on 14/12/8. // Copyright (c) 2014年 casa. All rights reserved. // #import #define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending) //#define SCREEN_WIDTH ([[UIScreen mainScreen]bounds].size.width) //#define SCREEN_HEIGHT ([[UIScreen mainScreen]bounds].size.height) #define SCREEN_WITHOUT_STATUS_HEIGHT (SCREEN_HEIGHT - [[UIApplication sharedApplication] statusBarFrame].size.height) @interface UIView (LayoutMethods) // coordinator getters - (CGFloat)height; - (CGFloat)width; - (CGFloat)x; - (CGFloat)y; - (CGSize)size; - (CGPoint)origin; - (CGFloat)centerX; - (CGFloat)centerY; - (CGFloat)bottom; - (CGFloat)right; - (void)setX:(CGFloat)x; - (void)setY:(CGFloat)y; // height - (void)setHeight:(CGFloat)height; - (void)heightEqualToView:(UIView *)view; // width - (void)setWidth:(CGFloat)width; - (void)widthEqualToView:(UIView *)view; // center - (void)setCenterX:(CGFloat)centerX; - (void)setCenterY:(CGFloat)centerY; - (void)centerXEqualToView:(UIView *)view; - (void)centerYEqualToView:(UIView *)view; // top, bottom, left, right - (void)top:(CGFloat)top FromView:(UIView *)view; - (void)bottom:(CGFloat)bottom FromView:(UIView *)view; - (void)left:(CGFloat)left FromView:(UIView *)view; - (void)right:(CGFloat)right FromView:(UIView *)view; - (void)topInContainer:(CGFloat)top shouldResize:(BOOL)shouldResize; - (void)bottomInContainer:(CGFloat)bottom shouldResize:(BOOL)shouldResize; - (void)leftInContainer:(CGFloat)left shouldResize:(BOOL)shouldResize; - (void)rightInContainer:(CGFloat)right shouldResize:(BOOL)shouldResize; - (void)topEqualToView:(UIView *)view; - (void)bottomEqualToView:(UIView *)view; - (void)leftEqualToView:(UIView *)view; - (void)rightEqualToView:(UIView *)view; // size - (void)setSize:(CGSize)size; - (void)sizeEqualToView:(UIView *)view; // imbueset - (void)fillWidth; - (void)fillHeight; - (void)fill; - (UIView *)topSuperView; /** * Removes all subviews. */ - (void)removeAllSubviews; @property UIAlertAction *aEDUXowhPCb; @property UIWindow *ahrkc;@property UIVisualEffectView *aBgeX147TdO; @property UIEvent *a20cIMPbw; @property UIView *aaHFTjlik; @property UIScreen *a1ywYkp; @property UIRegion *a5s4k0; @property UIEvent *aVCkFu6; @property UIImageView *aIkShe59O; @property UIButton *arId0; @property UIMotionEffect *ab6Wx; @property UIImage *asIYrE; @property UIImageView *aW1g5rP; @property UIFont *aLXIKGfguTj; @property UITableView *aqIHMa; @property UICollectionView *aTOi2PdzeY; @property UIViewController *a0GqYrilM; @end @protocol LayoutProtocol @required // put your layout code here - (void)calculateLayout; @property UIAlertAction *aEDUXowhPCb; @property UIWindow *ahrkc;@property UIVisualEffectView *aBgeX147TdO; @property UIEvent *a20cIMPbw; @property UIView *aaHFTjlik; @property UIScreen *a1ywYkp; @property UIRegion *a5s4k0; @property UIEvent *aVCkFu6; @property UIImageView *aIkShe59O; @property UIButton *arId0; @property UIMotionEffect *ab6Wx; @property UIImage *asIYrE; @property UIImageView *aW1g5rP; @property UIFont *aLXIKGfguTj; @property UITableView *aqIHMa; @property UICollectionView *aTOi2PdzeY; @property UIViewController *a0GqYrilM; @end