al
Aeline
2021-03-08 ce4eaddf9eb835f01e6bf5845a063d306f322b24
BuWanVideo2.0/CSJ/BUFoundation.framework/Headers/UIView+BUAdditions.h
@@ -8,6 +8,8 @@
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface UIView (BU_Additions)
- (UIImage *)bu_captureView;
@@ -22,12 +24,21 @@
    UIViewBorderOptionAll
} UIViewBorderOption;
typedef struct {
  CGFloat topLeft;
  CGFloat topRight;
  CGFloat bottomLeft;
  CGFloat bottomRight;
} BUFCornerRadii;
@interface UIView (BU_Border)
- (void)bu_setBorder:(UIViewBorderOption)option width:(CGFloat)width color:(UIColor *)color;
- (void)bu_setDashBorder:(UIViewBorderOption)option width:(CGFloat)width color:(UIColor *)color;
- (void)bu_roundCornerWithDashBorder:(CGFloat)radius width:(CGFloat)widht color:(UIColor *)color;
- (void)bu_updateClippingForLayer:(CALayer *)layer cornerRadii:(BUFCornerRadii)cornerRadii maxRadius:(CGFloat)maxRadius;
@end
@@ -36,8 +47,8 @@
@property (nonatomic) float bu_y;
@property (nonatomic) float bu_width;
@property (nonatomic) float bu_height;
@property (nonatomic, getter = bu_y,setter = setBu_y:) float top;
@property (nonatomic, getter = bu_x,setter = setBu_x:) float left;
@property (nonatomic, getter = bu_y,setter = setBu_y:) float bu_top;    // 增加bu前缀,防止与外部开发者的分类属性名冲突:https://jira.bytedance.com/browse/UNION-4447 fixed in 3300 by chaors
@property (nonatomic, getter = bu_x,setter = setBu_x:) float bu_left;
@property (nonatomic) float bu_bottom;
@property (nonatomic) float bu_right;
@property (nonatomic) CGSize bu_size;
@@ -50,17 +61,6 @@
@end
@interface UIView(BU_ScreenShot)
+ (UIImage *)bu_screenShot;
+ (UIImage *)bu_screenShotWithoutStatusBar;
- (UIImage *)bu_screenShot;
@end
@interface UIView (BU_TKCategory)
// DRAW GRADIENT
@@ -71,8 +71,8 @@
// DRAW LINE
+ (void)bu_drawLineInRect:(CGRect)rect red:(CGFloat)red green:(CGFloat)green blue:(CGFloat)blue alpha:(CGFloat)alpha;
+ (void)bu_drawLineInRect:(CGRect)rect colors:(CGFloat[])colors;
+ (void)bu_drawLineInRect:(CGRect)rect colors:(CGFloat[])colors width:(CGFloat)lineWidth cap:(CGLineCap)cap;
+ (void)bu_drawLineInRect:(CGRect)rect colors:(CGFloat[_Nullable])colors;
+ (void)bu_drawLineInRect:(CGRect)rect colors:(CGFloat[_Nullable])colors width:(CGFloat)lineWidth cap:(CGLineCap)cap;
@end
@@ -81,6 +81,10 @@
- (UILongPressGestureRecognizer *)bu_addLogPressGestureWithTarget:(id)target selecter:(SEL)aSelector;
@property (nonatomic, strong, nullable) UITapGestureRecognizer *bu_tgr;
// 会移除旧的手势
- (void)bu_addGestureRecognizerWithTarget:(id)target action:(SEL)action;
- (void)bu_removeGestureRecognizer;
@end
@interface UIView (BU_FindFirstResponder)
@@ -95,6 +99,10 @@
@interface UIView (BU_NearestController)
- (UIViewController *)bu_findNearestController;
@end
@interface UIView (BU_SafeArea)
@@ -103,3 +111,4 @@
+ (UIEdgeInsets)bu_defaultAreaInsets;
@end
NS_ASSUME_NONNULL_END