提交
This commit is contained in:
@@ -17,6 +17,13 @@ typedef NS_ENUM(NSInteger) {
|
||||
/// 抽100次
|
||||
QXMeetDrawBtnTypeHundred = 100,
|
||||
}QXMeetDrawBtnType;
|
||||
|
||||
@protocol QXMeetActivityViewDelegate <NSObject>
|
||||
|
||||
@optional
|
||||
-(void)timeDownDidFinished;
|
||||
|
||||
@end
|
||||
@interface QXMeetActivityView : UIView
|
||||
-(void)showInView:(UIView *)view;
|
||||
@property (nonatomic,strong)NSString *roomId;
|
||||
@@ -42,6 +49,8 @@ typedef NS_ENUM(NSInteger) {
|
||||
@property (nonatomic,assign)long long startTime;
|
||||
|
||||
@property (nonatomic,strong)QXTimer *timer;
|
||||
|
||||
@property (nonatomic,weak)id<QXMeetActivityViewDelegate>delegate;
|
||||
@end
|
||||
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
#import "QXMeetLotteryView.h"
|
||||
#import "QXDiamondViewController.h"
|
||||
@interface QXMeetActivityView()<UIGestureRecognizerDelegate,QXMeetLotteryViewDelegate>
|
||||
@interface QXMeetActivityView()<UIGestureRecognizerDelegate,QXMeetLotteryViewDelegate,QXMeetActivityViewDelegate>
|
||||
@property (nonatomic,strong)UIView *bgView;
|
||||
@property (nonatomic,strong)UIImageView *bgImageView;
|
||||
/// 奖池
|
||||
@@ -146,6 +146,7 @@
|
||||
[self.bgView addSubview:self.recordBtn];
|
||||
|
||||
self.timeDownView = [[QXMeetTimeDownView alloc] initWithFrame:CGRectMake((self.bgView.width-ScaleWidth(122))/2, self.rankBtn.top-4, ScaleWidth(122), ScaleWidth(29))];
|
||||
self.timeDownView.delegate = self;
|
||||
[self.bgView addSubview:self.timeDownView];
|
||||
|
||||
self.giftImageView = [[UIImageView alloc] initWithFrame:CGRectMake((self.bgView.width-ScaleWidth(118))/2, self.timeDownView.bottom+11, ScaleWidth(118), ScaleWidth(118))];
|
||||
@@ -325,6 +326,9 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
-(void)timeDownDidFinished{
|
||||
[self hide];
|
||||
}
|
||||
-(BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch{
|
||||
return touch.view == self;
|
||||
}
|
||||
@@ -624,10 +628,10 @@
|
||||
|
||||
NSString *time = [NSString stringWithFormat:@"%02ld%02ld",min,second];
|
||||
if (time.length == 4) {
|
||||
self.timeLabel1.text = [time substringWithRange:NSMakeRange(0, 1)];
|
||||
self.timeLabel2.text = [time substringWithRange:NSMakeRange(1, 1)];
|
||||
self.timeLabel3.text = [time substringWithRange:NSMakeRange(2, 1)];
|
||||
self.timeLabel4.text = [time substringWithRange:NSMakeRange(3, 1)];
|
||||
weakSelf.timeLabel1.text = [time substringWithRange:NSMakeRange(0, 1)];
|
||||
weakSelf.timeLabel2.text = [time substringWithRange:NSMakeRange(1, 1)];
|
||||
weakSelf.timeLabel3.text = [time substringWithRange:NSMakeRange(2, 1)];
|
||||
weakSelf.timeLabel4.text = [time substringWithRange:NSMakeRange(3, 1)];
|
||||
}
|
||||
if (weakSelf.startTime<=0) {
|
||||
[weakSelf stopTimer];
|
||||
@@ -635,6 +639,9 @@
|
||||
weakSelf.timeLabel2.text = @"0";
|
||||
weakSelf.timeLabel3.text = @"0";
|
||||
weakSelf.timeLabel4.text = @"0";
|
||||
if (weakSelf.delegate && [weakSelf.delegate respondsToSelector:@selector(timeDownDidFinished)]) {
|
||||
[weakSelf.delegate timeDownDidFinished];
|
||||
}
|
||||
}
|
||||
});
|
||||
}];
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
self.scrollView.showsHorizontalScrollIndicator = NO;
|
||||
self.scrollView.showsVerticalScrollIndicator = NO;
|
||||
self.scrollView.scrollEnabled = YES;
|
||||
self.scrollView.hidden = YES;
|
||||
// self.scrollView.hidden = YES;
|
||||
self.scrollView.decelerationRate = UIScrollViewDecelerationRateFast;
|
||||
[self addSubview:self.scrollView];
|
||||
_itemSpace = 25;
|
||||
@@ -76,7 +76,7 @@
|
||||
}
|
||||
|
||||
-(void)startLotteryAnimation{
|
||||
self.scrollView.hidden = NO;
|
||||
// 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