修改
This commit is contained in:
@@ -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:^{
|
||||
|
||||
Reference in New Issue
Block a user