This commit is contained in:
启星
2025-09-22 14:58:13 +08:00
parent 2776cf66c2
commit 048b9339eb
91 changed files with 518 additions and 131 deletions

View File

@@ -7,13 +7,15 @@
#import "QXMeetLotteryView.h"
#import <objc/runtime.h>
#import "GKCycleScrollView.h"
@interface QXMeetLotteryView ()<UIScrollViewDelegate>
@interface QXMeetLotteryView ()<UIScrollViewDelegate,GKCycleScrollViewDataSource,GKCycleScrollViewDelegate>
@property (nonatomic, strong) UIScrollView *scrollView;
@property (nonatomic, assign) CGFloat itemWidth;
@property (nonatomic, assign) CGFloat itemSpace;
@property (nonatomic, assign) CGFloat targetOffset;
@property (nonatomic, assign) CGFloat maxWidth;
@property (nonatomic, strong) QXTimer *timer;
@end
@implementation QXMeetLotteryView
@@ -33,7 +35,8 @@
self.scrollView.delegate = self;
self.scrollView.showsHorizontalScrollIndicator = NO;
self.scrollView.showsVerticalScrollIndicator = NO;
self.scrollView.scrollEnabled = NO;
self.scrollView.scrollEnabled = YES;
self.scrollView.hidden = YES;
self.scrollView.decelerationRate = UIScrollViewDecelerationRateFast;
[self addSubview:self.scrollView];
_itemSpace = 25;
@@ -73,6 +76,7 @@
}
-(void)startLotteryAnimation{
self.scrollView.hidden = NO;
[self.scrollView setContentOffset:CGPointZero animated:NO];
MJWeakSelf
[UIView animateWithDuration:6 delay:0 options:UIViewAnimationOptionCurveEaseInOut animations:^{