添加HWPanModal和FLAnimatedImage

This commit is contained in:
2025-11-05 22:04:56 +08:00
parent efdcf60ed1
commit abf32e8457
97 changed files with 10853 additions and 2067 deletions

View File

@@ -0,0 +1,18 @@
//
// UIScrollView+Helper.h
// Pods
//
// Created by heath wang on 2019/10/15.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface UIScrollView (Helper)
@property (nonatomic, assign, readonly) BOOL isScrolling;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,16 @@
//
// UIScrollView+Helper.m
// Pods
//
// Created by heath wang on 2019/10/15.
//
#import "UIScrollView+Helper.h"
@implementation UIScrollView (Helper)
- (BOOL)isScrolling {
return (self.isDragging && !self.isDecelerating) || self.isTracking;
}
@end

View File

@@ -0,0 +1,28 @@
//
// UIView+HW_Frame.h
// HWPanModal
//
// Created by heath wang on 2019/5/20.
//
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface UIView (HW_Frame)
@property (nonatomic, assign) CGFloat hw_left; ///< Shortcut for frame.origin.x.
@property (nonatomic, assign) CGFloat hw_top; ///< Shortcut for frame.origin.y
@property (nonatomic, assign) CGFloat hw_right; ///< Shortcut for frame.origin.x + frame.size.width
@property (nonatomic, assign) CGFloat hw_bottom; ///< Shortcut for frame.origin.y + frame.size.height
@property (nonatomic, assign) CGFloat hw_width; ///< Shortcut for frame.size.width.
@property (nonatomic, assign) CGFloat hw_height; ///< Shortcut for frame.size.height.
@property (nonatomic, assign) CGFloat hw_centerX; ///< Shortcut for center.x
@property (nonatomic, assign) CGFloat hw_centerY; ///< Shortcut for center.y
@property (nonatomic, assign) CGPoint hw_origin; ///< Shortcut for frame.origin.
@property (nonatomic, assign) CGSize hw_size; ///< Shortcut for frame.size.
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,109 @@
//
// UIView+HW_Frame.m
// HWPanModal
//
// Created by heath wang on 2019/5/20.
//
#import "UIView+HW_Frame.h"
@implementation UIView (HW_Frame)
- (CGFloat)hw_left {
return self.frame.origin.x;
}
- (void)setHw_left:(CGFloat)hwLeft {
CGRect frame = self.frame;
frame.origin.x = hwLeft;
self.frame = frame;
}
- (CGFloat)hw_top {
return self.frame.origin.y;
}
- (void)setHw_top:(CGFloat)hwTop {
CGRect frame = self.frame;
frame.origin.y = hwTop;
self.frame = frame;
}
- (CGFloat)hw_right {
return self.frame.origin.x + self.frame.size.width;
}
- (void)setHw_right:(CGFloat)hwRight {
CGRect frame = self.frame;
frame.origin.x = hwRight - self.frame.size.width;
self.frame = frame;
}
- (CGFloat)hw_bottom {
return self.frame.origin.y + self.frame.size.height;
}
- (void)setHw_bottom:(CGFloat)hwBottom {
CGRect frame = self.frame;
frame.origin.y = hwBottom - self.frame.size.height;
self.frame = frame;
}
- (CGFloat)hw_width {
return self.frame.size.width;
}
- (void)setHw_width:(CGFloat)hwWidth {
CGRect frame = self.frame;
frame.size.width = hwWidth;
self.frame = frame;
}
- (CGFloat)hw_height {
return self.frame.size.height;
}
- (void)setHw_height:(CGFloat)hwHeight {
CGRect frame = self.frame;
frame.size.height = hwHeight;
self.frame = frame;
}
- (CGFloat)hw_centerX {
return self.center.x;
}
- (void)setHw_centerX:(CGFloat)hwCenterX {
self.center = CGPointMake(hwCenterX, self.center.y);
}
- (CGFloat)hw_centerY {
return self.center.y;
}
- (void)setHw_centerY:(CGFloat)hwCenterY {
self.center = CGPointMake(self.center.x, hwCenterY);
}
- (CGPoint)hw_origin {
return self.frame.origin;
}
- (void)setHw_origin:(CGPoint)hwOrigin {
CGRect frame = self.frame;
frame.origin = hwOrigin;
self.frame = frame;
}
- (CGSize)hw_size {
return self.frame.size;
}
- (void)setHw_size:(CGSize)hwSize {
CGRect frame = self.frame;
frame.size = hwSize;
self.frame = frame;
}
@end