1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- //
- // UIView+RQExtension.h
- // RQCommon
- //
- // Created by 张嵘 on 2018/11/16.
- // Copyright © 2018 张嵘. All rights reserved.
- //
- #import <UIKit/UIKit.h>
- @interface UIView (RQExtension)
- #pragma mark - Gesture
- - (void)setTapActionWithBlock:(void (^)(UITapGestureRecognizer*tap))block;
- - (void)setLongPressActionWithBlock:(void (^)(UILongPressGestureRecognizer*longP))block;
- #pragma mark - Other
- /**
- * 判断一个控件是否真正显示在主窗口
- */
- - (BOOL)rq_isShowingOnKeyWindow;
- /**
- * xib创建的view
- */
- + (instancetype)rq_viewFromXib;
- /**
- * xib创建的view
- */
- + (instancetype)rq_viewFromXibWithFrame:(CGRect)frame;
- /**
- * xib中显示的属性
- */
- /// < Shortcut for frame.origin.x.
- @property (nonatomic, readwrite, assign) CGFloat rq_left;
- /// < Shortcut for frame.origin.y
- @property (nonatomic, readwrite, assign) CGFloat rq_top;
- /// < Shortcut for frame.origin.x + frame.size.width
- @property (nonatomic, readwrite, assign) CGFloat rq_right;
- /// < Shortcut for frame.origin.y + frame.size.height
- @property (nonatomic, readwrite, assign) CGFloat rq_bottom;
- /// < Shortcut for frame.origin.x.
- @property (nonatomic, readwrite, assign) CGFloat rq_x;
- /// < Shortcut for frame.origin.y
- @property (nonatomic, readwrite, assign) CGFloat rq_y;
- /// < Shortcut for frame.size.width
- @property (nonatomic, readwrite, assign) CGFloat rq_width;
- /// < Shortcut for frame.size.height
- @property (nonatomic, readwrite, assign) CGFloat rq_height;
- /// < Shortcut for center.x
- @property (nonatomic, readwrite, assign) CGFloat rq_centerX;
- ///< Shortcut for center.y
- @property (nonatomic, readwrite, assign) CGFloat rq_centerY;
- /// < Shortcut for frame.size.
- @property (nonatomic, readwrite, assign) CGSize rq_size;
- /// < Shortcut for frame.origin.
- @property (nonatomic, readwrite, assign) CGPoint rq_origin;
- @end
|