123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120 |
- //
- // UIView+Additions.h
- // iBee
- //
- //
- #import <Foundation/Foundation.h>
- #import <UIKit/UIKit.h>
- #import <QuartzCore/QuartzCore.h>
- @class CALayer,DMPageView;
- @interface UIView (Additions)
- /**
- * Shortcut for frame.origin.x.
- *
- * Sets frame.origin.x = left
- */
- @property (nonatomic) CGFloat left;
- /**
- * Shortcut for frame.origin.y
- *
- * Sets frame.origin.y = top
- */
- @property (nonatomic) CGFloat top;
- /**
- * Shortcut for frame.origin.x + frame.size.width
- *
- * Sets frame.origin.x = right - frame.size.width
- */
- @property (nonatomic) CGFloat right;
- /**
- * Shortcut for frame.origin.y + frame.size.height
- *
- * Sets frame.origin.y = bottom - frame.size.height
- */
- @property (nonatomic) CGFloat bottom;
- /**
- * Shortcut for frame.size.width
- *
- * Sets frame.size.width = width
- */
- @property (nonatomic) CGFloat width;
- /**
- * Shortcut for frame.size.height
- *
- * Sets frame.size.height = height
- */
- @property (nonatomic) CGFloat height;
- /**
- * Shortcut for center.x
- *
- * Sets center.x = centerX
- */
- @property (nonatomic) CGFloat centerX;
- /**
- * Shortcut for center.y
- *
- * Sets center.y = centerY
- */
- @property (nonatomic) CGFloat centerY;
- /**
- * Return the x coordinate on the screen.
- */
- @property (nonatomic, readonly) CGFloat ttScreenX;
- /**
- * Return the y coordinate on the screen.
- */
- @property (nonatomic, readonly) CGFloat ttScreenY;
- /**
- * Return the x coordinate on the screen, taking into account scroll views.
- */
- @property (nonatomic, readonly) CGFloat screenViewX;
- /**
- * Return the y coordinate on the screen, taking into account scroll views.
- */
- @property (nonatomic, readonly) CGFloat screenViewY;
- /**
- * Return the view frame on the screen, taking into account scroll views.
- */
- @property (nonatomic, readonly) CGRect screenFrame;
- /**
- * Shortcut for frame.origin
- */
- @property (nonatomic) CGPoint origin;
- /**
- * Shortcut for frame.size
- */
- @property (nonatomic) CGSize size;
- /**
- * Shortcut for layer.transfrom
- */
- -(void)removeAllSubviews;
- -(void)removeViewWithTag:(NSInteger)tag;
- -(void)removeViewWithTags:(NSArray *)tagArray;
- -(void)removeViewWithTagLessThan:(NSInteger)tag;
- -(void)removeViewWithTagGreaterThan:(NSInteger)tag;
- - (UIViewController *)selfViewController;
- -(UIView *)subviewWithTag:(NSInteger)tag;
- @end
|