Commit 85bff1f1 authored by Mazy's avatar Mazy

Merge remote-tracking branch 'refs/remotes/origin/master'

parents c4ced2ab bd403b89
......@@ -29,12 +29,15 @@
64F89681255FABB800AF9AD7 /* AddGDTADManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 64F89678255FABB800AF9AD7 /* AddGDTADManager.m */; };
64F89682255FABB800AF9AD7 /* IOSADManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 64F89679255FABB800AF9AD7 /* IOSADManager.m */; };
64F89683255FABB800AF9AD7 /* GYAdsTrackMode.m in Sources */ = {isa = PBXBuildFile; fileRef = 64F8967B255FABB800AF9AD7 /* GYAdsTrackMode.m */; };
686352072563E0E400F7BAD3 /* WelfareCenterVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 686352052563E0E400F7BAD3 /* WelfareCenterVC.m */; };
686352082563E0E400F7BAD3 /* WelfareCenterVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = 686352062563E0E400F7BAD3 /* WelfareCenterVC.xib */; };
686352292563E26900F7BAD3 /* WelfareCenterCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 686352272563E26900F7BAD3 /* WelfareCenterCell.m */; };
6863522A2563E26900F7BAD3 /* WelfareCenterCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 686352282563E26900F7BAD3 /* WelfareCenterCell.xib */; };
685896832567EDAC00A38A96 /* WelfareCenterCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6858967D2567EDAC00A38A96 /* WelfareCenterCell.xib */; };
685896842567EDAC00A38A96 /* WelfareCenterCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 6858967E2567EDAC00A38A96 /* WelfareCenterCell.m */; };
685896852567EDAC00A38A96 /* WelfareCenterVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 685896802567EDAC00A38A96 /* WelfareCenterVC.m */; };
685896862567EDAC00A38A96 /* WelfareCenterVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = 685896812567EDAC00A38A96 /* WelfareCenterVC.xib */; };
6882AD002566A68A008CF1F3 /* ClockInVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 6882ACFE2566A68A008CF1F3 /* ClockInVC.m */; };
6882AD012566A68A008CF1F3 /* ClockInVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6882ACFF2566A68A008CF1F3 /* ClockInVC.xib */; };
6882AD1F2567CDEF008CF1F3 /* WelfareBoxData.m in Sources */ = {isa = PBXBuildFile; fileRef = 6882AD1E2567CDEF008CF1F3 /* WelfareBoxData.m */; };
6882AD252567CEC1008CF1F3 /* DGUniversalAlertView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6882AD222567CEC1008CF1F3 /* DGUniversalAlertView.m */; };
6882AD262567CEC1008CF1F3 /* DGUniversalAlertView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6882AD242567CEC1008CF1F3 /* DGUniversalAlertView.xib */; };
68A81D192566461A003C1BF1 /* UIView+AdaptScreen.m in Sources */ = {isa = PBXBuildFile; fileRef = 68A81D102566461A003C1BF1 /* UIView+AdaptScreen.m */; };
68A81D1A2566461A003C1BF1 /* UIView+WHView.m in Sources */ = {isa = PBXBuildFile; fileRef = 68A81D112566461A003C1BF1 /* UIView+WHView.m */; };
68A81D1B2566461A003C1BF1 /* ESLyhXibView.m in Sources */ = {isa = PBXBuildFile; fileRef = 68A81D142566461A003C1BF1 /* ESLyhXibView.m */; };
......@@ -172,15 +175,20 @@
64F8967B255FABB800AF9AD7 /* GYAdsTrackMode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GYAdsTrackMode.m; sourceTree = "<group>"; };
64F8967C255FABB800AF9AD7 /* GYAdsTrackModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GYAdsTrackModel.h; sourceTree = "<group>"; };
64F8967D255FABB800AF9AD7 /* IOSADManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IOSADManager.h; sourceTree = "<group>"; };
686352042563E0E400F7BAD3 /* WelfareCenterVC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WelfareCenterVC.h; sourceTree = "<group>"; };
686352052563E0E400F7BAD3 /* WelfareCenterVC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = WelfareCenterVC.m; sourceTree = "<group>"; };
686352062563E0E400F7BAD3 /* WelfareCenterVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = WelfareCenterVC.xib; sourceTree = "<group>"; };
686352262563E26900F7BAD3 /* WelfareCenterCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WelfareCenterCell.h; sourceTree = "<group>"; };
686352272563E26900F7BAD3 /* WelfareCenterCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = WelfareCenterCell.m; sourceTree = "<group>"; };
686352282563E26900F7BAD3 /* WelfareCenterCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = WelfareCenterCell.xib; sourceTree = "<group>"; };
6858967D2567EDAC00A38A96 /* WelfareCenterCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = WelfareCenterCell.xib; sourceTree = "<group>"; };
6858967E2567EDAC00A38A96 /* WelfareCenterCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WelfareCenterCell.m; sourceTree = "<group>"; };
6858967F2567EDAC00A38A96 /* WelfareCenterVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WelfareCenterVC.h; sourceTree = "<group>"; };
685896802567EDAC00A38A96 /* WelfareCenterVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WelfareCenterVC.m; sourceTree = "<group>"; };
685896812567EDAC00A38A96 /* WelfareCenterVC.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = WelfareCenterVC.xib; sourceTree = "<group>"; };
685896822567EDAC00A38A96 /* WelfareCenterCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WelfareCenterCell.h; sourceTree = "<group>"; };
6882ACFD2566A68A008CF1F3 /* ClockInVC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ClockInVC.h; sourceTree = "<group>"; };
6882ACFE2566A68A008CF1F3 /* ClockInVC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ClockInVC.m; sourceTree = "<group>"; };
6882ACFF2566A68A008CF1F3 /* ClockInVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ClockInVC.xib; sourceTree = "<group>"; };
6882AD1D2567CDEF008CF1F3 /* WelfareBoxData.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WelfareBoxData.h; sourceTree = "<group>"; };
6882AD1E2567CDEF008CF1F3 /* WelfareBoxData.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = WelfareBoxData.m; sourceTree = "<group>"; };
6882AD222567CEC1008CF1F3 /* DGUniversalAlertView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DGUniversalAlertView.m; sourceTree = "<group>"; };
6882AD232567CEC1008CF1F3 /* DGUniversalAlertView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DGUniversalAlertView.h; sourceTree = "<group>"; };
6882AD242567CEC1008CF1F3 /* DGUniversalAlertView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = DGUniversalAlertView.xib; sourceTree = "<group>"; };
68A81D0C2566461A003C1BF1 /* UIView+HExtension.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIView+HExtension.h"; sourceTree = "<group>"; };
68A81D0D2566461A003C1BF1 /* UIColor+HExtension.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIColor+HExtension.h"; sourceTree = "<group>"; };
68A81D0E2566461A003C1BF1 /* UIView+DHExtension.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIView+DHExtension.h"; sourceTree = "<group>"; };
......@@ -370,6 +378,12 @@
6882ACFB2566A61E008CF1F3 /* Welfare */ = {
isa = PBXGroup;
children = (
685896822567EDAC00A38A96 /* WelfareCenterCell.h */,
6858967E2567EDAC00A38A96 /* WelfareCenterCell.m */,
6858967D2567EDAC00A38A96 /* WelfareCenterCell.xib */,
6858967F2567EDAC00A38A96 /* WelfareCenterVC.h */,
685896802567EDAC00A38A96 /* WelfareCenterVC.m */,
685896812567EDAC00A38A96 /* WelfareCenterVC.xib */,
6882AD062566A6FD008CF1F3 /* model */,
);
path = Welfare;
......@@ -567,6 +581,8 @@
A91A79C4254024A400F9B216 /* GYOrderInfoModel.m */,
A9AB9D822540672D00F0D766 /* GYDayTaskModel.h */,
A9AB9D832540672D00F0D766 /* GYDayTaskModel.m */,
6882AD1D2567CDEF008CF1F3 /* WelfareBoxData.h */,
6882AD1E2567CDEF008CF1F3 /* WelfareBoxData.m */,
64BF50DA25679F9F000F2554 /* GYRankingListModel.h */,
64BF50DB25679F9F000F2554 /* GYRankingListModel.m */,
);
......@@ -588,6 +604,9 @@
A91A7960253F188D00F9B216 /* Alert */ = {
isa = PBXGroup;
children = (
6882AD232567CEC1008CF1F3 /* DGUniversalAlertView.h */,
6882AD222567CEC1008CF1F3 /* DGUniversalAlertView.m */,
6882AD242567CEC1008CF1F3 /* DGUniversalAlertView.xib */,
A91A797B253F244F00F9B216 /* GYGiftAlertView.h */,
A91A797C253F244F00F9B216 /* GYGiftAlertView.m */,
A91A7981253F248E00F9B216 /* GYGiftAlertView.xib */,
......@@ -628,12 +647,6 @@
A91A799B253FE21600F9B216 /* View */ = {
isa = PBXGroup;
children = (
686352042563E0E400F7BAD3 /* WelfareCenterVC.h */,
686352052563E0E400F7BAD3 /* WelfareCenterVC.m */,
686352062563E0E400F7BAD3 /* WelfareCenterVC.xib */,
686352262563E26900F7BAD3 /* WelfareCenterCell.h */,
686352272563E26900F7BAD3 /* WelfareCenterCell.m */,
686352282563E26900F7BAD3 /* WelfareCenterCell.xib */,
A91A799F253FE25A00F9B216 /* GYSettingCell.h */,
A91A79A0253FE25A00F9B216 /* GYSettingCell.m */,
A9AB9D77254046CB00F0D766 /* ProgressView.h */,
......@@ -825,19 +838,21 @@
A9AB9D7225403E6B00F0D766 /* GYTaskCell.xib in Resources */,
6882AD012566A68A008CF1F3 /* ClockInVC.xib in Resources */,
A9AB9D62254039FD00F0D766 /* GYTaskAlertView.xib in Resources */,
6863522A2563E26900F7BAD3 /* WelfareCenterCell.xib in Resources */,
A93AF227254AB23E002E8CBE /* GYCountDownTimeView.xib in Resources */,
A91A791E253EF29B00F9B216 /* GYNative.storyboard in Resources */,
A9AB9D9F2541228E00F0D766 /* MBProgressHUD.bundle in Resources */,
A91A796B253F193F00F9B216 /* GYRedPacketView.xib in Resources */,
685896832567EDAC00A38A96 /* WelfareCenterCell.xib in Resources */,
A91A794F253F14C300F9B216 /* LaunchScreenPlaceHolder.storyboard in Resources */,
A91A78C9253EE70600F9B216 /* Main.storyboard in Resources */,
A9AB9D8C25407BBB00F0D766 /* GYSignInCell.xib in Resources */,
A91A79BF25401E3500F9B216 /* GYOrderInfoCell.xib in Resources */,
A91A79AC25400BAD00F9B216 /* GYGiftCell.xib in Resources */,
6882AD262567CEC1008CF1F3 /* DGUniversalAlertView.xib in Resources */,
A9AB9D6A25403E3500F0D766 /* GYTaskAlertCollectionHeaderView.xib in Resources */,
A91A78C8253EE70600F9B216 /* LaunchScreen.storyboard in Resources */,
A91A7884253EE56D00F9B216 /* Assets.xcassets in Resources */,
685896862567EDAC00A38A96 /* WelfareCenterVC.xib in Resources */,
A91A7882253EE56B00F9B216 /* Main.storyboard in Resources */,
A91A7982253F248E00F9B216 /* GYGiftAlertView.xib in Resources */,
64BF50F42567B490000F2554 /* GYRankingFooterView.xib in Resources */,
......@@ -845,7 +860,6 @@
64BF50E52567ABA6000F2554 /* GYRankingUserInfoView.xib in Resources */,
A93AF243254AED79002E8CBE /* GYWithDrawAlertView.xib in Resources */,
64BF50D1256794C8000F2554 /* GYRankingHeaderView.xib in Resources */,
686352082563E0E400F7BAD3 /* WelfareCenterVC.xib in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
......@@ -936,7 +950,9 @@
64BF50F02567B482000F2554 /* GYRankingFooterView.m in Sources */,
A9AB9D6925403E3500F0D766 /* GYTaskAlertCollectionHeaderView.m in Sources */,
A9AB9D932541222A00F0D766 /* GYWebViewController.m in Sources */,
685896852567EDAC00A38A96 /* WelfareCenterVC.m in Sources */,
A91A7950253F14C300F9B216 /* ZJGuideConfig.m in Sources */,
6882AD252567CEC1008CF1F3 /* DGUniversalAlertView.m in Sources */,
A91A7879253EE56B00F9B216 /* AppDelegate.mm in Sources */,
A9AB9D7B254046CB00F0D766 /* WTProgressView.m in Sources */,
A91A7944253F0BBA00F9B216 /* GYSignInModel.m in Sources */,
......@@ -947,7 +963,6 @@
68A81D1C2566461A003C1BF1 /* UIView+DHExtension.m in Sources */,
6882AD002566A68A008CF1F3 /* ClockInVC.m in Sources */,
A91A794E253F14C300F9B216 /* LaunchScreenPlaceHolderVC.m in Sources */,
686352292563E26900F7BAD3 /* WelfareCenterCell.m in Sources */,
64F8967F255FABB800AF9AD7 /* AddCSJADManager.m in Sources */,
64022D5C255D6B7D00513333 /* GYCashSixAwardAlertView.m in Sources */,
64F89680255FABB800AF9AD7 /* AddRuiShiADManager.m in Sources */,
......@@ -959,12 +974,14 @@
A91A7903253EE8E300F9B216 /* Data.m in Sources */,
A9AB9D7A254046CB00F0D766 /* ProgressView.m in Sources */,
A91A78F3253EE87500F9B216 /* CGNetworkTools.m in Sources */,
6882AD1F2567CDEF008CF1F3 /* WelfareBoxData.m in Sources */,
64BF50BF25678F52000F2554 /* GYRankingViewController.m in Sources */,
A91A7963253F192A00F9B216 /* GYRedPacketView.m in Sources */,
A91A78D5253EE75500F9B216 /* CGUserManager.m in Sources */,
68A81D34256647AB003C1BF1 /* BaseViewController.m in Sources */,
A9AB9D7125403E6B00F0D766 /* GYTaskCell.m in Sources */,
A91A79A1253FE25A00F9B216 /* GYSettingCell.m in Sources */,
685896842567EDAC00A38A96 /* WelfareCenterCell.m in Sources */,
68A81D1D2566461A003C1BF1 /* UIColor+HExtension.m in Sources */,
A91A79C5254024A400F9B216 /* GYOrderInfoModel.m in Sources */,
A91A79B22540199800F9B216 /* GYOrderAlertView.m in Sources */,
......@@ -987,7 +1004,6 @@
64F89683255FABB800AF9AD7 /* GYAdsTrackMode.m in Sources */,
A91A7913253EEF5100F9B216 /* GYWheelSurfModel.m in Sources */,
64BF50DC25679F9F000F2554 /* GYRankingListModel.m in Sources */,
686352072563E0E400F7BAD3 /* WelfareCenterVC.m in Sources */,
64F8967E255FABB800AF9AD7 /* AddSigmobADManager.m in Sources */,
68A81D4E25664F29003C1BF1 /* WelfareCenterData.m in Sources */,
);
......
//
// DGUniversalAlertView.h
// DodoGarden
//
// Created by Mazy on 2020/11/7.
//
#import <UIKit/UIKit.h>
//#import "DGOpenBoxModel.h"
//#import "DGWheelSurfModel.h"
//#import "DGWdHistoryModel.h"
#import "WelfareBoxData.h"
NS_ASSUME_NONNULL_BEGIN
@interface DGUniversalAlertView : UIView
@property (weak, nonatomic) IBOutlet UIView *mainContentView;
@property (weak, nonatomic) IBOutlet UIImageView *topTypeImageView;
@property (weak, nonatomic) IBOutlet UIView *firstStackView;
@property (weak, nonatomic) IBOutlet UIView *secondStackView;
@property (weak, nonatomic) IBOutlet UIView *thirdStackView;
@property (weak, nonatomic) IBOutlet UIImageView *lightImageView;
@property (strong, nonatomic) IBOutletCollection(UIImageView) NSArray *centerGainImageViews;
@property (strong, nonatomic) IBOutletCollection(UILabel) NSArray *gainCountLabels;
@property (weak, nonatomic) IBOutlet UILabel *contentLabel;
@property (weak, nonatomic) IBOutlet UIStackView *contentStackView;
//@property (nonatomic, strong) DGOpenBoxModel *boxModel;
+(DGUniversalAlertView *)loadFromNib;
- (void)showAlertToView: (UIView *)toView;
- (void)hideAlert;
//- (void)configWithSurfModel:(DGWheelSurfModel *)surfModel;
//
//- (void)configWithBoxModel:(DGOpenBoxModel *)boxModel;
////DGWdHistoryModel
//- (void)configWithWdResultModel:(DGWdResultModel *)resultModel;
//显示每日福利宝箱奖励
- (void)configWithWelfareBoxModel:(NSArray *)boxModels;
@property(nonatomic, copy) void(^closeCallBack)(void);
@end
NS_ASSUME_NONNULL_END
//
// DGUniversalAlertView.m
// DodoGarden
//
// Created by Mazy on 2020/11/7.
//
#import "DGUniversalAlertView.h"
@interface DGUniversalAlertView ()
@property (nonatomic, strong) NSMutableArray * dataSource;
@property (weak, nonatomic) IBOutlet UIButton *bottomStatusButton;
@property (weak, nonatomic) IBOutlet UIImageView *topTitleButton;
@end
@implementation DGUniversalAlertView
+(DGUniversalAlertView *)loadFromNib {
return [[UINib nibWithNibName:@"DGUniversalAlertView" bundle:nil] instantiateWithOwner:self options:nil].firstObject;
}
- (void)awakeFromNib {
[super awakeFromNib];
self.mainContentView.transform = CGAffineTransformMakeScale(0.01, 0.01);
}
// 开心收下
- (IBAction)gainRewardAction:(UIButton *)sender {
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.30 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
if(self.closeCallBack){
self.closeCallBack();
}
[self hideAlert];
});
}
- (IBAction)dismissAction {
[self hideAlert];
}
- (void)layoutSubviews {
[super layoutSubviews];
self.frame = UIScreen.mainScreen.bounds;
}
- (void)showAlertToView: (UIView *)toView {
[toView addSubview:self];
// [self mas_makeConstraints:^(MASConstraintMaker *make) {
// make.edges.equalTo(self);
// }];
[UIView animateWithDuration:0.15 animations:^{
self.mainContentView.transform = CGAffineTransformMakeScale(1, 1);
} completion:^(BOOL finished) {
}];
}
- (void)hideAlert {
[UIView animateWithDuration:0.15 animations:^{
self.mainContentView.transform = CGAffineTransformMakeScale(0.01, 0.01);
} completion:^(BOOL finished) {
[self removeFromSuperview];
// if (self.dismissedClosure) {
// self.dismissedClosure(false);
// }
}];
}
//- (void)configWithWdResultModel:(DGWdResultModel *)resultModel {
// self.contentStackView.hidden = true;
//
// self.contentLabel.hidden = false;
// self.contentLabel.text = resultModel.reason;
//
// if (resultModel.buttonStatus == 1) {
// self.topTitleButton.image = [UIImage imageNamed:@"title_withdraw_success"];
// } else {
// self.topTitleButton.image = [UIImage imageNamed:@"title_base_alert"];
// }
//
// [self.bottomStatusButton setImage:[UIImage imageNamed:@"convert_continue_get_bg"] forState:UIControlStateNormal];
//
//}
//
////DGWheelSurfModel
//// NSInteger awardType;//奖励类型 1 水滴 2 果子 3 种子 4 金币 5 加速剂 6 现金红包 7钻石
//- (void)configWithSurfModel:(DGWheelSurfModel *)surfModel {
// //奖励类型 1 水滴 2 果子 3 种子 4 金币 5 加速剂 6 现金红包 7钻石
// // _wheelSurfModel = wheelSurfModel;
// // self.topTypeImageView.image = [UIImage imageNamed:[NSString stringWithFormat:@"gift_header_%ld", (long)surfModel.awardType]];
// self.dataSource = [NSMutableArray new];
// switch (surfModel.awardType) {
// case 3:
// self.topTypeImageView.image = [UIImage imageNamed:@"title_gain_seed"];
// self.dataSource = surfModel.extModels;
// break;
// case 4:
// self.topTypeImageView.image = [UIImage imageNamed:@"title_gain_coin"];
// [self.dataSource addObject:[DGExtModel new]];
// break;
// case 5:
// self.topTypeImageView.image = [UIImage imageNamed:@"title_gain_accelerator"];
// [self.dataSource addObject:[DGExtModel new]];
// break;
// case 7:
// self.topTypeImageView.image = [UIImage imageNamed:@"title_gain_diamond"];
// [self.dataSource addObject:[DGExtModel new]];
// break;
// default:
// break;
// }
//
// if (self.dataSource.count == 1) {
// self.firstStackView.hidden = false;
// self.secondStackView.hidden = true;
// self.thirdStackView.hidden = true;
// self.lightImageView.hidden = false;
// } else if (self.dataSource.count == 2) {
// self.firstStackView.hidden = false;
// self.secondStackView.hidden = false;
// self.thirdStackView.hidden = true;
// self.lightImageView.hidden = true;
// } else if (self.dataSource.count == 3) {
// self.firstStackView.hidden = false;
// self.secondStackView.hidden = false;
// self.thirdStackView.hidden = false;
// self.lightImageView.hidden = true;
// }
//
// // NSInteger awardType;//奖励类型 1 水滴 2 果子 3 种子 4 金币 5 加速剂 6 现金红包 7钻石
// for (DGExtModel *model in self.dataSource) {
// if (surfModel.awardType == 4) {
// self.topTypeImageView.image = [UIImage imageNamed:@"title_gain_coin"];
// for (UIImageView *imageV in self.centerGainImageViews) {
// imageV.image = [UIImage imageNamed:@"gift_gold"];
// }
//
// for (UILabel *label in self.gainCountLabels) {
// label.text = [NSString stringWithFormat:@"+%@", surfModel.awardNum];
// }
//
// } else if (surfModel.awardType == 3) {
// self.topTypeImageView.image = [UIImage imageNamed:@"title_gain_seed"];
// for (UIImageView *imageV in self.centerGainImageViews) {
// if (imageV.tag - 1000 == model.id) {
// imageV.image = [UIImage imageNamed:[NSString stringWithFormat:@"gift_seed_%ld", model.id]];
// }
// }
//
// for (UILabel *label in self.gainCountLabels) {
// if (label.tag - 2000 == model.id) {
// label.text = [NSString stringWithFormat:@"+%ld", model.num];
// }
// }
//
// } else { // awardType = 5 加速剂
// self.topTypeImageView.image = [UIImage imageNamed:@"title_gain_accelerator"];
// for (UIImageView *imageV in self.centerGainImageViews) {
// imageV.image = [UIImage imageNamed:@"gift_accelerator"];
// }
//
// for (UILabel *label in self.gainCountLabels) {
// label.text = [NSString stringWithFormat:@"+%@", surfModel.awardNum];
// }
// }
// }
//}
//
//- (void)configWithBoxModel:(DGOpenBoxModel *)boxModel {
// self.boxModel = boxModel;
//
// self.dataSource = [NSMutableArray new];
// switch (_boxModel.type) {
// case 1:
// self.dataSource = _boxModel.seeds;
// break;
// case 2:
// [self.dataSource addObject:[DGExtModel new]];
// break;
// case 3:
// [self.dataSource addObject:[DGExtModel new]];
// break;
// default:
// break;
// }
//
// if (self.dataSource.count == 1) {
// self.firstStackView.hidden = false;
// self.secondStackView.hidden = true;
// self.thirdStackView.hidden = true;
// self.lightImageView.hidden = false;
// } else if (self.dataSource.count == 2) {
// self.firstStackView.hidden = false;
// self.secondStackView.hidden = false;
// self.thirdStackView.hidden = true;
// self.lightImageView.hidden = true;
// } else if (self.dataSource.count == 3) {
// self.firstStackView.hidden = false;
// self.secondStackView.hidden = false;
// self.thirdStackView.hidden = false;
// self.lightImageView.hidden = true;
// }
//
// for (DGExtModel *model in self.dataSource) {
// if (self.boxModel.type == 2) {
// self.topTypeImageView.image = [UIImage imageNamed:@"title_gain_coin"];
// for (UIImageView *imageV in self.centerGainImageViews) {
// // if (imageV.tag - 1000 == model.id) {
// imageV.image = [UIImage imageNamed:@"gift_gold"];
// // }
// }
//
// for (UILabel *label in self.gainCountLabels) {
// // if (label.tag - 2000 == model.id) {
// label.text = [NSString stringWithFormat:@"+%ld", (long)_boxModel.awardNum];
// // }
// }
//
// }else if (_boxModel.type == 1){
// // title_gain_box/
// self.topTypeImageView.image = [UIImage imageNamed:@"title_gain_seed"];
// for (UIImageView *imageV in self.centerGainImageViews) {
// if (imageV.tag - 1000 == model.id) {
// imageV.image = [UIImage imageNamed:[NSString stringWithFormat:@"gift_seed_%ld", model.id]];
// }
// }
//
// for (UILabel *label in self.gainCountLabels) {
// if (label.tag - 2000 == model.id) {
// label.text = [NSString stringWithFormat:@"+%ld", model.num];
// }
// }
//
// }else{ // type = 3 加速剂
// self.topTypeImageView.image = [UIImage imageNamed:@"title_gain_accelerator"];
// for (UIImageView *imageV in self.centerGainImageViews) {
// // if (imageV.tag - 1000 == model.id) {
// imageV.image = [UIImage imageNamed:@"gift_accelerator"];
// // }
// }
//
// for (UILabel *label in self.gainCountLabels) {
// // if (label.tag - 2000 == model.id) {
// label.text = [NSString stringWithFormat:@"+%ld", (long)_boxModel.awardNum];
// // }
// }
// }
// }
//
//}
//显示每日福利宝箱奖励
- (void)configWithWelfareBoxModel:(NSArray *)boxModels;{
self.firstStackView.hidden = false;
self.secondStackView.hidden = false;
self.thirdStackView.hidden = false;
// self.lightImageView.hidden = false;
self.topTypeImageView.image = [UIImage imageNamed:@"title_gain_box"];
self.topTypeImageView.hidden = NO;
NSInteger index = 0;
for (WelfareBoxData * data in boxModels) {
//value = "奖励类型", notes = "1 种子 2 金币 3 加速剂"
UIImageView *imageV = self.centerGainImageViews[index];
UILabel *label = self.gainCountLabels[index];
index += 1;
if (data.awardType == 1) {
imageV.image = [UIImage imageNamed:[NSString stringWithFormat:@"gift_seed_%ld",data.subType]];
label.text = [NSString stringWithFormat:@"+%ld", (long)data.awardNum];
}else if (data.awardType == 2){
imageV.image = [UIImage imageNamed:@"gift_gold"];
label.text = [NSString stringWithFormat:@"+%ld", (long)data.awardNum];
}else if (data.awardType == 3){
imageV.image = [UIImage imageNamed:@"gift_accelerator"];
label.text = [NSString stringWithFormat:@"+%ld", (long)data.awardNum];
}
}
}
@end
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="17156" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17125"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view contentMode="scaleToFill" id="iN0-l3-epB" customClass="DGUniversalAlertView">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="S0K-eJ-Pw8">
<rect key="frame" x="37" y="275.5" width="340" height="355"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="universal_alert_bg_1" translatesAutoresizingMaskIntoConstraints="NO" id="MNk-jL-twi">
<rect key="frame" x="0.0" y="54.5" width="340" height="300.5"/>
</imageView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="cri-CQ-Md6">
<rect key="frame" x="283.5" y="59.5" width="51.5" height="50.5"/>
<state key="normal" image="universal_alert_cancel_icon"/>
<connections>
<action selector="dismissAction" destination="iN0-l3-epB" eventType="touchUpInside" id="az4-bX-EdD"/>
</connections>
</button>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="universal_alert_bg_2" translatesAutoresizingMaskIntoConstraints="NO" id="5Rj-ay-A2g">
<rect key="frame" x="0.0" y="0.0" width="340" height="342"/>
</imageView>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="title_gain_box" translatesAutoresizingMaskIntoConstraints="NO" id="35R-vx-ECx">
<rect key="frame" x="70" y="30" width="200" height="44"/>
<constraints>
<constraint firstAttribute="width" constant="200" id="VED-Xe-Cf6"/>
<constraint firstAttribute="height" constant="44" id="WfV-0l-UwB"/>
</constraints>
</imageView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="N4w-cO-H6a">
<rect key="frame" x="56" y="284" width="228" height="41"/>
<state key="normal" image="universal_alert_get_bg"/>
<connections>
<action selector="gainRewardAction:" destination="iN0-l3-epB" eventType="touchUpInside" id="5la-b1-lMF"/>
</connections>
</button>
<stackView opaque="NO" contentMode="scaleToFill" distribution="fillEqually" translatesAutoresizingMaskIntoConstraints="NO" id="7dU-TM-xZl">
<rect key="frame" x="30" y="104" width="280" height="170"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="sws-xe-s8D">
<rect key="frame" x="0.0" y="0.0" width="93.5" height="170"/>
<subviews>
<imageView hidden="YES" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="universal_alert_light_icon" translatesAutoresizingMaskIntoConstraints="NO" id="sjX-c2-RUm">
<rect key="frame" x="0.0" y="0.0" width="93.5" height="160"/>
</imageView>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" tag="1001" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="task_center_coin_icon" translatesAutoresizingMaskIntoConstraints="NO" id="AKw-V6-tAE">
<rect key="frame" x="14.5" y="53" width="64" height="64"/>
<constraints>
<constraint firstAttribute="width" constant="64" id="A5h-fA-GQA"/>
<constraint firstAttribute="height" constant="64" id="bx9-9i-In7"/>
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" tag="2001" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="+1" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="y5Q-rc-eix">
<rect key="frame" x="36" y="136" width="21.5" height="24"/>
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="20"/>
<color key="textColor" red="0.41568627450980389" green="0.13725490196078433" blue="0.10196078431372549" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<constraints>
<constraint firstItem="y5Q-rc-eix" firstAttribute="centerX" secondItem="sws-xe-s8D" secondAttribute="centerX" id="0Ez-wl-dcu"/>
<constraint firstAttribute="bottom" secondItem="y5Q-rc-eix" secondAttribute="bottom" constant="10" id="9Ur-yN-fXI"/>
<constraint firstItem="AKw-V6-tAE" firstAttribute="centerY" secondItem="sws-xe-s8D" secondAttribute="centerY" id="LCR-BW-Wvk"/>
<constraint firstAttribute="bottom" secondItem="sjX-c2-RUm" secondAttribute="bottom" constant="10" id="Rix-xd-2Ja"/>
<constraint firstAttribute="trailing" secondItem="sjX-c2-RUm" secondAttribute="trailing" id="glo-Eq-cfw"/>
<constraint firstItem="sjX-c2-RUm" firstAttribute="leading" secondItem="sws-xe-s8D" secondAttribute="leading" id="kEb-A7-HcZ"/>
<constraint firstItem="AKw-V6-tAE" firstAttribute="centerX" secondItem="sws-xe-s8D" secondAttribute="centerX" id="ldo-ZL-751"/>
<constraint firstItem="sjX-c2-RUm" firstAttribute="top" secondItem="sws-xe-s8D" secondAttribute="top" id="qLF-yf-LG0"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="LUz-5L-L6l">
<rect key="frame" x="93.5" y="0.0" width="93" height="170"/>
<subviews>
<imageView hidden="YES" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="universal_alert_light_icon" translatesAutoresizingMaskIntoConstraints="NO" id="MCb-xf-3P8">
<rect key="frame" x="0.0" y="0.0" width="93" height="160"/>
</imageView>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" tag="1002" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="task_center_coin_icon" translatesAutoresizingMaskIntoConstraints="NO" id="FBa-xJ-Ddx">
<rect key="frame" x="14.5" y="53" width="64" height="64"/>
<constraints>
<constraint firstAttribute="height" constant="64" id="MGL-B2-R8h"/>
<constraint firstAttribute="width" constant="64" id="lp3-Yy-Ose"/>
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" tag="2002" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="+1" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="cjF-fN-3kH">
<rect key="frame" x="36" y="136" width="21.5" height="24"/>
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="20"/>
<color key="textColor" red="0.41568627450000001" green="0.13725490200000001" blue="0.1019607843" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<constraints>
<constraint firstItem="cjF-fN-3kH" firstAttribute="centerX" secondItem="LUz-5L-L6l" secondAttribute="centerX" id="HYs-05-SPJ"/>
<constraint firstAttribute="bottom" secondItem="cjF-fN-3kH" secondAttribute="bottom" constant="10" id="TEc-qr-HZj"/>
<constraint firstItem="FBa-xJ-Ddx" firstAttribute="centerX" secondItem="LUz-5L-L6l" secondAttribute="centerX" id="ZGz-el-j6D"/>
<constraint firstAttribute="bottom" secondItem="MCb-xf-3P8" secondAttribute="bottom" constant="10" id="epE-E7-8yi"/>
<constraint firstItem="MCb-xf-3P8" firstAttribute="top" secondItem="LUz-5L-L6l" secondAttribute="top" id="jMd-wC-0q6"/>
<constraint firstItem="FBa-xJ-Ddx" firstAttribute="centerY" secondItem="LUz-5L-L6l" secondAttribute="centerY" id="mPF-LO-7UW"/>
<constraint firstItem="MCb-xf-3P8" firstAttribute="leading" secondItem="LUz-5L-L6l" secondAttribute="leading" id="nBL-Bv-nSe"/>
<constraint firstAttribute="trailing" secondItem="MCb-xf-3P8" secondAttribute="trailing" id="zrO-Vm-t4Q"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="PPo-Nc-hS2">
<rect key="frame" x="186.5" y="0.0" width="93.5" height="170"/>
<subviews>
<imageView hidden="YES" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="universal_alert_light_icon" translatesAutoresizingMaskIntoConstraints="NO" id="qBt-eV-cBl">
<rect key="frame" x="0.0" y="0.0" width="93.5" height="160"/>
</imageView>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" tag="1003" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="task_center_coin_icon" translatesAutoresizingMaskIntoConstraints="NO" id="3BQ-2B-80E">
<rect key="frame" x="15" y="53" width="64" height="64"/>
<constraints>
<constraint firstAttribute="width" constant="64" id="5K7-AE-8PB"/>
<constraint firstAttribute="height" constant="64" id="RQX-h3-pxL"/>
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" tag="2003" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="+1" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="7ED-I3-oZF">
<rect key="frame" x="36" y="136" width="21.5" height="24"/>
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="20"/>
<color key="textColor" red="0.41568627450000001" green="0.13725490200000001" blue="0.1019607843" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<constraints>
<constraint firstItem="qBt-eV-cBl" firstAttribute="top" secondItem="PPo-Nc-hS2" secondAttribute="top" id="2zE-HD-QeQ"/>
<constraint firstItem="7ED-I3-oZF" firstAttribute="centerX" secondItem="PPo-Nc-hS2" secondAttribute="centerX" id="AgF-a6-zCu"/>
<constraint firstItem="3BQ-2B-80E" firstAttribute="centerY" secondItem="PPo-Nc-hS2" secondAttribute="centerY" id="B9o-Ie-joe"/>
<constraint firstAttribute="bottom" secondItem="7ED-I3-oZF" secondAttribute="bottom" constant="10" id="GSD-C2-GvP"/>
<constraint firstItem="qBt-eV-cBl" firstAttribute="leading" secondItem="PPo-Nc-hS2" secondAttribute="leading" id="a1u-9Z-Zwt"/>
<constraint firstAttribute="trailing" secondItem="qBt-eV-cBl" secondAttribute="trailing" id="mLf-gt-pRf"/>
<constraint firstItem="3BQ-2B-80E" firstAttribute="centerX" secondItem="PPo-Nc-hS2" secondAttribute="centerX" id="r8n-zp-CcS"/>
<constraint firstAttribute="bottom" secondItem="qBt-eV-cBl" secondAttribute="bottom" constant="10" id="rQB-by-L4R"/>
</constraints>
</view>
</subviews>
</stackView>
<label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="恭喜您成功兑换0.3元红包,您 可以前往微信钱包查看到账情况~" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ykG-Gi-xEC">
<rect key="frame" x="40" y="114" width="260" height="160"/>
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="17"/>
<color key="textColor" red="0.41568627450980389" green="0.13725490196078433" blue="0.10196078431372549" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<constraints>
<constraint firstItem="cri-CQ-Md6" firstAttribute="top" secondItem="MNk-jL-twi" secondAttribute="top" constant="5" id="6cw-AU-FdR"/>
<constraint firstItem="7dU-TM-xZl" firstAttribute="leading" secondItem="S0K-eJ-Pw8" secondAttribute="leading" constant="30" id="97O-Zr-r9e"/>
<constraint firstAttribute="width" constant="340" id="9jW-1X-ByW"/>
<constraint firstItem="35R-vx-ECx" firstAttribute="top" secondItem="S0K-eJ-Pw8" secondAttribute="top" constant="30" id="APM-r5-cYO"/>
<constraint firstItem="N4w-cO-H6a" firstAttribute="top" secondItem="ykG-Gi-xEC" secondAttribute="bottom" constant="10" id="F3C-5c-5Yd"/>
<constraint firstAttribute="trailing" secondItem="7dU-TM-xZl" secondAttribute="trailing" constant="30" id="Gqz-LX-oRB"/>
<constraint firstAttribute="bottom" secondItem="N4w-cO-H6a" secondAttribute="bottom" constant="30" id="INj-7W-0Kr"/>
<constraint firstItem="N4w-cO-H6a" firstAttribute="centerX" secondItem="S0K-eJ-Pw8" secondAttribute="centerX" id="LVz-tP-tbC"/>
<constraint firstAttribute="trailing" secondItem="ykG-Gi-xEC" secondAttribute="trailing" constant="40" id="WIA-lW-aOO"/>
<constraint firstItem="35R-vx-ECx" firstAttribute="centerX" secondItem="S0K-eJ-Pw8" secondAttribute="centerX" id="aYR-yu-I2Y"/>
<constraint firstItem="ykG-Gi-xEC" firstAttribute="top" secondItem="7dU-TM-xZl" secondAttribute="top" constant="10" id="grP-bP-VUC"/>
<constraint firstItem="5Rj-ay-A2g" firstAttribute="leading" secondItem="S0K-eJ-Pw8" secondAttribute="leading" id="kUn-EW-xtC"/>
<constraint firstAttribute="trailing" secondItem="MNk-jL-twi" secondAttribute="trailing" id="kg5-nc-NAu"/>
<constraint firstAttribute="trailing" secondItem="5Rj-ay-A2g" secondAttribute="trailing" id="m5D-SN-JUx"/>
<constraint firstAttribute="bottom" secondItem="MNk-jL-twi" secondAttribute="bottom" id="pZr-8a-MBs"/>
<constraint firstItem="cri-CQ-Md6" firstAttribute="trailing" secondItem="MNk-jL-twi" secondAttribute="trailing" constant="-5" id="sOI-hv-52a"/>
<constraint firstAttribute="height" constant="355" id="swy-FJ-WSv"/>
<constraint firstItem="MNk-jL-twi" firstAttribute="leading" secondItem="S0K-eJ-Pw8" secondAttribute="leading" id="uJb-V2-QdQ"/>
<constraint firstItem="N4w-cO-H6a" firstAttribute="top" secondItem="7dU-TM-xZl" secondAttribute="bottom" constant="10" id="vjj-H2-QWm"/>
<constraint firstItem="7dU-TM-xZl" firstAttribute="top" secondItem="35R-vx-ECx" secondAttribute="bottom" constant="30" id="vlM-et-p1c"/>
<constraint firstItem="5Rj-ay-A2g" firstAttribute="top" secondItem="S0K-eJ-Pw8" secondAttribute="top" id="yci-vw-x8D"/>
<constraint firstItem="ykG-Gi-xEC" firstAttribute="leading" secondItem="S0K-eJ-Pw8" secondAttribute="leading" constant="40" id="zsY-U5-yZK"/>
</constraints>
</view>
</subviews>
<viewLayoutGuide key="safeArea" id="vUN-kp-3ea"/>
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.80000000000000004" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="S0K-eJ-Pw8" firstAttribute="centerX" secondItem="vUN-kp-3ea" secondAttribute="centerX" id="Wxd-gh-i6L"/>
<constraint firstItem="S0K-eJ-Pw8" firstAttribute="centerY" secondItem="vUN-kp-3ea" secondAttribute="centerY" id="yMD-xC-XmL"/>
</constraints>
<connections>
<outlet property="bottomStatusButton" destination="N4w-cO-H6a" id="oCP-qo-sxF"/>
<outlet property="contentLabel" destination="ykG-Gi-xEC" id="geC-Tz-7bB"/>
<outlet property="contentStackView" destination="7dU-TM-xZl" id="2mc-sq-VMS"/>
<outlet property="firstStackView" destination="sws-xe-s8D" id="p0V-Vr-bPG"/>
<outlet property="lightImageView" destination="sjX-c2-RUm" id="qJJ-j1-eJp"/>
<outlet property="mainContentView" destination="S0K-eJ-Pw8" id="GGc-BB-ZNT"/>
<outlet property="secondStackView" destination="LUz-5L-L6l" id="9Qk-1B-xJg"/>
<outlet property="thirdStackView" destination="PPo-Nc-hS2" id="NYZ-4r-u9c"/>
<outlet property="topTitleButton" destination="35R-vx-ECx" id="uoK-gp-Q5H"/>
<outlet property="topTypeImageView" destination="35R-vx-ECx" id="Jj4-NS-Zxe"/>
<outletCollection property="centerGainImageViews" destination="AKw-V6-tAE" id="i0h-vm-Kuo"/>
<outletCollection property="centerGainImageViews" destination="FBa-xJ-Ddx" id="eGp-rW-USC"/>
<outletCollection property="centerGainImageViews" destination="3BQ-2B-80E" id="BuC-g7-gYg"/>
<outletCollection property="gainCountLabels" destination="y5Q-rc-eix" id="Dbc-Jc-mTA"/>
<outletCollection property="gainCountLabels" destination="cjF-fN-3kH" id="IWG-cp-kgJ"/>
<outletCollection property="gainCountLabels" destination="7ED-I3-oZF" id="pso-7V-SsM"/>
</connections>
<point key="canvasLocation" x="140.57971014492756" y="136.60714285714286"/>
</view>
</objects>
<resources>
<image name="task_center_coin_icon" width="18" height="19"/>
<image name="title_gain_box" width="460" height="99"/>
<image name="universal_alert_bg_1" width="340.5" height="300.5"/>
<image name="universal_alert_bg_2" width="310.5" height="342"/>
<image name="universal_alert_cancel_icon" width="51.5" height="50.5"/>
<image name="universal_alert_get_bg" width="228" height="51"/>
<image name="universal_alert_light_icon" width="147.5" height="150"/>
</resources>
</document>
......@@ -24,6 +24,7 @@
#import "GYLoginViewController.h"
#import "GYCashSixAwardAlertView.h"
#import "WelfareCenterVC.h"
#import "ClockInVC.h"
#import "GYRankingViewController.h"
UnityFramework* UnityFrameworkLoad()
......@@ -145,24 +146,33 @@ NSDictionary* appLaunchOpts;
// 跳转每日福利
- (void)ios_oneveryDayWelfareClick {
[[CGUserManager shared] addLocCollection:@"show_welfare_center_page" value:@""];
// ClockInVC * vc = [[ClockInVC alloc]init];
// UINavigationController * nav = [[UINavigationController alloc] initWithRootViewController:vc];
//
// nav.modalPresentationStyle = UIModalPresentationFullScreen;
// [[[self ufw] appController].window.rootViewController presentViewController:nav
// animated:YES
// completion:nil];
[[CGUserManager shared] addLocCollection:@"show_welfare_center_page" value:@""];
GYWebViewController * web = [[GYWebViewController alloc] init];
web.url = [[CGUserManager shared].h5_url objectForKey:@"welfareurl"];
if (web.url == nil || web.url.length == 0) {
web.url = WelfareURL;
}
WelfareCenterVC * vc = [[WelfareCenterVC alloc]init];
UINavigationController * nav = [[UINavigationController alloc] initWithRootViewController:vc];
nav.modalPresentationStyle = UIModalPresentationFullScreen;
[[[self ufw] appController].window.rootViewController presentViewController:nav
animated:YES
completion:nil];
WEAKSELF
[self unityVideo:false]; //关闭背景音乐
......
{
"images" : [
{
"filename" : "title_gain_box.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "universal_alert_bg_1@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "universal_alert_bg_1@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "universal_alert_bg_2@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "universal_alert_bg_2@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "universal_alert_cancel_icon@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "universal_alert_cancel_icon@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "universal_alert_get_bg@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "universal_alert_get_bg@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "universal_alert_light_icon@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "universal_alert_light_icon@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "BackgroundLight@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "BackgroundLight@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
......@@ -15,13 +15,13 @@
#define GYPrefixHeader_pch
//测试
//#define ServerReport @"http://reporttest.zhangxinhulian.com"
//#define ServerHost @"http://feedapitest2.zhangxinhulian.com" // 服务端接口地址
//#define ServerAds @"http://bstest.zhangxinhulian.com/v4/ads"
#define ServerReport @"http://reporttest.zhangxinhulian.com"
#define ServerHost @"http://feedapitest2.zhangxinhulian.com" // 服务端接口地址
#define ServerAds @"http://bstest.zhangxinhulian.com/v4/ads"
////正式
#define ServerReport @"http://report.clouddistribute.net"
#define ServerHost @"https://feedapi.clouddistribute.net" // 服务端接口地址
#define ServerAds @"http://bs.clouddistribute.net/v4/ads"
//#define ServerReport @"http://report.clouddistribute.net"
//#define ServerHost @"https://feedapi.clouddistribute.net" // 服务端接口地址
//#define ServerAds @"http://bs.clouddistribute.net/v4/ads"
#define WXAppId @"wxe7a03eb52cce1b51"
......
......@@ -12,7 +12,7 @@ NS_ASSUME_NONNULL_BEGIN
@interface GYWheelSurfModel : GYBaseModel
@property (nonatomic, copy) NSString * name;
@property (nonatomic, copy) NSString * awardNum;
@property (nonatomic, copy) NSString * awardNum; //奖品数量
@property (nonatomic, assign) NSInteger awardType; //奖励类型 1 水滴 2 果子 3 种子 4 金币 5 加速剂 6 红包 7钻石
@property (nonatomic, copy) NSString * countDownSecond;
@property (nonatomic, strong) NSDictionary * extJson;
......@@ -20,6 +20,8 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic, copy) NSString * lotteryNum;
@property (nonatomic, copy) NSString * showVideo;
@property (nonatomic, assign)NSInteger subType; //
@property (nonatomic, strong) NSMutableArray * extModels;
@end
......
//
// WelfareBoxData.h
// GYDemo
//
// Created by zhangshuai on 2020/11/20.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface WelfareBoxData : NSObject
@property (nonatomic ,assign)NSInteger awardNum; //奖励数值
@property (nonatomic ,assign)NSInteger awardType; //value = "奖励类型", notes = "1 种子 2 金币 3 加速剂"
@property (nonatomic ,assign)NSInteger boxID;
@property (nonatomic ,assign)NSInteger subType; // 奖励子类型
@end
NS_ASSUME_NONNULL_END
//
// WelfareBoxData.m
// GYDemo
//
// Created by zhangshuai on 2020/11/20.
//
#import "WelfareBoxData.h"
@implementation WelfareBoxData
+ (NSDictionary *)mj_replacedKeyFromPropertyName{
return @{
@"boxID" : @"id"//前边的是你想用的key,后边的是返回的key
};
}
@end
......@@ -234,10 +234,10 @@ static CGNetworkTools* _tools = nil;
//Ads请求
- (void)getWithAdsAction: (TQNetwortGetAction)action parameters:(id)parameters success: (void(^)(id response))success failure:(void(^)(NSError * error)) failure {
// get 请求
NSString *urlString = [ServerAds stringByAppendingPathComponent: [self convertGetActionToString:action]];
NSString *urlString = [ServerAds stringByAppendingString: [self convertGetActionToString:action]];
NSDictionary * params = [self setRequestParams: parameters];
NSLog(@"%@->\n%@",urlString,params)
[self GET: urlString parameters: params headers:nil progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) {
success(responseObject);
} failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
......@@ -258,7 +258,7 @@ static CGNetworkTools* _tools = nil;
- (void)postWithLogCollection: (TQNetwortPostAction)action parameters:(id) parameters success: (void(^)(id *response))success failure:(void(^)(NSError * error)) failure {
// post 请求
NSString *urlString = [ServerReport stringByAppendingPathComponent: [self convertPostActionToString:action]];
NSString *urlString = [ServerReport stringByAppendingString: [self convertPostActionToString:action]];
NSDictionary *dic= parameters;
NSData *data = [NSJSONSerialization dataWithJSONObject:dic options:NSJSONWritingFragmentsAllowed error:nil];
......@@ -316,7 +316,7 @@ static CGNetworkTools* _tools = nil;
} else {
[dict setValue: @"AppStore" forKey: @"source"];
}
// [dict setValue: @"common" forKey: @"source"];
[dict setValue: @"toutiao" forKey: @"source"];
NSString *uid = [[data Read] objectForKey:@"uid"];
if (uid != nil) { [dict setValue: uid forKey: @"uid"]; }
......
//
// WelfareCenterCell.m
// GYDemo
//
// Created by zhangshuai on 2020/11/17.
//
#import "WelfareCenterCell.h"
@implementation WelfareCenterCell
- (void)awakeFromNib {
[super awakeFromNib];
// Initialization code
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
// Configure the view for the selected state
}
@end
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="17156" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17125"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="WelfareCenterVC">
<connections>
<outlet property="tableView" destination="cLQ-3z-U9W" id="lrz-YI-VgV"/>
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="cLQ-3z-U9W">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<connections>
<outlet property="dataSource" destination="-1" id="YN3-rf-K4G"/>
<outlet property="delegate" destination="-1" id="ifg-sF-Ftu"/>
</connections>
</tableView>
</subviews>
<viewLayoutGuide key="safeArea" id="Q5M-cg-NOt"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="Q5M-cg-NOt" firstAttribute="trailing" secondItem="cLQ-3z-U9W" secondAttribute="trailing" id="028-KM-XZz"/>
<constraint firstItem="cLQ-3z-U9W" firstAttribute="leading" secondItem="Q5M-cg-NOt" secondAttribute="leading" id="7pf-5Q-Gok"/>
<constraint firstAttribute="bottom" secondItem="cLQ-3z-U9W" secondAttribute="bottom" id="8VV-5W-bB8"/>
<constraint firstItem="cLQ-3z-U9W" firstAttribute="top" secondItem="Q5M-cg-NOt" secondAttribute="top" id="kEn-qd-C6h"/>
</constraints>
<point key="canvasLocation" x="-146" y="69"/>
</view>
</objects>
<resources>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
</resources>
</document>
......@@ -15,9 +15,24 @@
- (void)viewDidLoad {
[super viewDidLoad];
self.title = @"打卡领奖";
[self loadData];
// Do any additional setup after loading the view from its nib.
}
- (void)loadData{
[[CGNetworkTools shared] getWithAction:ddcy_clock_list parameters:@{} success:^(id _Nonnull response) {
} failure:^(NSError * _Nonnull error) {
}];
}
/*
#pragma mark - Navigation
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13142" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="17156" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12042"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17125"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="ClockInVC">
<connections>
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="ClockInVC"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<viewLayoutGuide key="safeArea" id="Q5M-cg-NOt"/>
</view>
</objects>
</document>
......@@ -8,11 +8,15 @@
#import "WelfareCenterVC.h"
#import "WelfareCenterData.h"
#import "WelfareBoxData.h"
#import "DGUniversalAlertView.h"
#import "WelfareCenterCell.h"
#define Identifier @"WelfareCenterCell"
#import "AppDelegate.h"
#define MAXProcess (6)
@interface WelfareCenterVC ()
......@@ -234,13 +238,14 @@
}
if (self.coinsProcess >= 6) {
[self.treasureBox setBackgroundImage:[UIImage imageNamed:@"OpenTreasureChest"] forState:UIControlStateNormal];
[self.treasureBox setImage:[UIImage imageNamed:@"OpenTreasureChest"] forState:UIControlStateNormal];
}else{
[self.treasureBox setBackgroundImage:[UIImage imageNamed:@"TreasureChestClose"] forState:UIControlStateNormal];
[self.treasureBox setImage:[UIImage imageNamed:@"TreasureChestClose"] forState:UIControlStateNormal];
}
self.currentText.text = [NSString stringWithFormat:@"%ld",self.coinsProcess];
[self.tableView reloadData];
}
//MARK: 看广告
......@@ -284,7 +289,8 @@
if ([[response objectForKey:@"status"] integerValue] == 200) {
NSLog(@"welfare_video_report success");
weakSelf.currentData.status = 1;
[weakSelf.tableView reloadData];
weakSelf.coinsProcess += 1;
[weakSelf updateUI];
}
} failure:^(NSError * _Nonnull error) {
[MBProgressHUD hideHUD];
......@@ -295,9 +301,48 @@
- (IBAction)treasureBoxClick:(UIButton *)sender {
// NSMutableArray * array = [NSMutableArray new];
// WelfareBoxData * data = [[WelfareBoxData alloc]init];
// data.awardNum = 1;
// data.awardType = 1;
// data.boxID = 1;
// data.subType = 2;
// [array addObject:data];
//
// data = [[WelfareBoxData alloc]init];
// data.awardNum = 154;
// data.awardType = 2;
// data.boxID = 2;
// data.subType = 0;
// [array addObject:data];
//
// data = [[WelfareBoxData alloc]init];
// data.awardNum = 8;
// data.awardType = 3;
// data.boxID = 3;
// data.subType = 0;
// [array addObject:data];
//
// DGUniversalAlertView * alertView = [DGUniversalAlertView loadFromNib];
// [alertView configWithWelfareBoxModel:array];
// [alertView showAlertToView:[(AppDelegate *)[UIApplication sharedApplication].delegate getMainWindow]];
//
// return;
WEAKSELF;
[[CGNetworkTools shared] postWithAction:welfare_task_box parameters:@{} success:^(id _Nonnull response) {
if (response) {
if(weakSelf.coinsProcess >= 6){
weakSelf.coinsProcess -= 6;
}
[weakSelf updateUI];
NSArray * array = response[@"result"][@"data"];
NSMutableArray * dataArray = [WelfareBoxData mj_objectArrayWithKeyValuesArray:array];
DGUniversalAlertView * alertView = [DGUniversalAlertView loadFromNib];
[alertView configWithWelfareBoxModel:dataArray];
[alertView showAlertToView:weakSelf.view];
}
} failure:^(NSError * _Nonnull error) {
......
......@@ -52,10 +52,19 @@
<constraint firstAttribute="height" constant="1" id="0Br-kg-Mkw"/>
</constraints>
</imageView>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="BackgroundLight" translatesAutoresizingMaskIntoConstraints="NO" id="CTR-NW-hAk">
<rect key="frame" x="297.5" y="12.5" width="85" height="85"/>
<constraints>
<constraint firstAttribute="height" constant="85" id="isH-zN-fKh"/>
<constraint firstAttribute="width" secondItem="CTR-NW-hAk" secondAttribute="height" multiplier="1:1" id="z6A-10-2ER"/>
</constraints>
</imageView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="PvX-s8-Pxm">
<rect key="frame" x="315" y="35" width="50" height="40"/>
<constraints>
<constraint firstAttribute="width" constant="50" id="AqL-sD-MtI"/>
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="50" id="EQP-m9-4dB"/>
<constraint firstAttribute="height" constant="40" id="pK3-VH-oEx"/>
</constraints>
<state key="normal" image="TreasureChestClose"/>
<connections>
......@@ -136,8 +145,10 @@
<constraint firstItem="S8p-gf-4z7" firstAttribute="centerY" secondItem="PvX-s8-Pxm" secondAttribute="centerY" id="J7o-Gj-r1w"/>
<constraint firstItem="PvX-s8-Pxm" firstAttribute="leading" secondItem="eOX-rq-v0m" secondAttribute="trailing" id="L1t-z1-uiU"/>
<constraint firstItem="PvX-s8-Pxm" firstAttribute="top" secondItem="RPC-kr-Miv" secondAttribute="bottom" constant="8" id="Q76-5G-gA0"/>
<constraint firstItem="CTR-NW-hAk" firstAttribute="centerY" secondItem="PvX-s8-Pxm" secondAttribute="centerY" id="WfN-EX-VKW"/>
<constraint firstItem="RPC-kr-Miv" firstAttribute="centerX" secondItem="PvX-s8-Pxm" secondAttribute="centerX" id="ZnZ-nM-S50"/>
<constraint firstItem="CdA-K9-h8P" firstAttribute="top" secondItem="D2D-AV-eup" secondAttribute="top" constant="10" id="i4a-bl-9sN"/>
<constraint firstItem="CTR-NW-hAk" firstAttribute="centerX" secondItem="PvX-s8-Pxm" secondAttribute="centerX" id="ptb-gv-XiT"/>
<constraint firstAttribute="bottom" secondItem="PvX-s8-Pxm" secondAttribute="bottom" constant="10" id="qm8-6b-fpD"/>
<constraint firstAttribute="height" constant="85" id="s0L-kX-UPf"/>
<constraint firstItem="eOX-rq-v0m" firstAttribute="leading" secondItem="S8p-gf-4z7" secondAttribute="leading" id="skH-3l-nIp"/>
......@@ -145,8 +156,8 @@
<constraint firstAttribute="trailing" secondItem="PvX-s8-Pxm" secondAttribute="trailing" constant="10" id="wDk-D9-G2s"/>
</constraints>
</view>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="cLQ-3z-U9W">
<rect key="frame" x="0.0" y="85" width="375" height="582"/>
<tableView clipsSubviews="YES" contentMode="scaleToFill" misplaced="YES" alwaysBounceVertical="YES" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="cLQ-3z-U9W">
<rect key="frame" x="0.0" y="74" width="375" height="582"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<color key="sectionIndexBackgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<connections>
......@@ -173,6 +184,7 @@
</view>
</objects>
<resources>
<image name="BackgroundLight" width="147.5" height="150"/>
<image name="BottomOfTheBackground" width="375" height="128"/>
<image name="MissionDiamond" width="17" height="15"/>
<image name="TreasureChestClose" width="48" height="40"/>
......
......@@ -10,6 +10,15 @@
NS_ASSUME_NONNULL_BEGIN
@interface WelfareCenterCell : UITableViewCell
@property (weak, nonatomic) IBOutlet UILabel *title;
@property (weak, nonatomic) IBOutlet UILabel *subTitle;
@property (weak, nonatomic) IBOutlet UIButton *awardNum;
@property (weak, nonatomic) IBOutlet UIButton *buttonState;
- (IBAction)stateButtonClick:(UIButton *)sender;
@property (nonatomic ,copy) void (^buttonBlock)(WelfareCenterCell * thisCell);
@property (nonatomic ,assign)NSInteger status; // 按钮状态
@end
......
//
// WelfareCenterCell.m
// GYDemo
//
// Created by zhangshuai on 2020/11/17.
//
#import "WelfareCenterCell.h"
@implementation WelfareCenterCell
- (void)awakeFromNib {
[super awakeFromNib];
// Initialization code
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
// Configure the view for the selected state
}
- (void)setStatus:(NSInteger)status{
//0 : 去完成 1: 明日再来 2: 立即领取
_status = status;
if (status == 0) {
[self.buttonState setTitle:@"去完成" forState:UIControlStateNormal];
[self.buttonState setBackgroundImage:[UIImage imageNamed:@"ToFinishRed"] forState:UIControlStateNormal];
}else if(status == 1){
[self.buttonState setTitle:@"明日再来" forState:UIControlStateNormal];
[self.buttonState setBackgroundImage:[UIImage imageNamed:@"CollectedGrey"] forState:UIControlStateNormal];
}else if (status == 2){
[self.buttonState setTitle:@"立即领取" forState:UIControlStateNormal];
[self.buttonState setBackgroundImage:[UIImage imageNamed:@"GetItNow"] forState:UIControlStateNormal];
}else{
[self.buttonState setTitle:@"明日再来" forState:UIControlStateNormal];
[self.buttonState setBackgroundImage:[UIImage imageNamed:@"CollectedGrey"] forState:UIControlStateNormal];
}
}
- (IBAction)stateButtonClick:(UIButton *)sender {
if (self.buttonBlock) {
self.buttonBlock(self);
}
}
@end
......@@ -41,6 +41,9 @@
<state key="normal" title="立即领取" backgroundImage="GetItNow">
<color key="titleColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
</state>
<connections>
<action selector="stateButtonClick:" destination="KGk-i7-Jjw" eventType="touchUpInside" id="aP1-iP-3jo"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="hkj-qT-nh4">
<rect key="frame" x="223.5" y="53" width="39" height="20"/>
......@@ -53,6 +56,7 @@
<color key="backgroundColor" red="0.99607843137254903" green="0.9882352941176471" blue="0.88627450980392153" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstItem="hkj-qT-nh4" firstAttribute="centerX" secondItem="dyx-aR-S4p" secondAttribute="centerX" id="8HW-1s-Wwg"/>
<constraint firstAttribute="bottom" relation="greaterThanOrEqual" secondItem="Go5-7x-zg8" secondAttribute="bottom" constant="14" id="9Yq-a9-JYg"/>
<constraint firstItem="Go5-7x-zg8" firstAttribute="leading" secondItem="1Hi-6u-Z8f" secondAttribute="leading" id="BQB-Lx-flj"/>
<constraint firstAttribute="bottom" secondItem="dyx-aR-S4p" secondAttribute="bottom" constant="7" id="Ghm-cq-BfQ"/>
<constraint firstItem="Go5-7x-zg8" firstAttribute="top" secondItem="1Hi-6u-Z8f" secondAttribute="bottom" constant="6" id="Nph-zt-FH0"/>
......@@ -69,7 +73,7 @@
</userDefinedRuntimeAttributes>
</view>
</subviews>
<color key="backgroundColor" red="0.96862745098039216" green="0.74117647058823533" blue="0.48627450980392156" alpha="1" colorSpace="calibratedRGB"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="nDA-SS-B2Z" firstAttribute="top" secondItem="pr8-hQ-LpE" secondAttribute="top" id="8fC-07-6l8"/>
<constraint firstAttribute="trailing" secondItem="nDA-SS-B2Z" secondAttribute="trailing" constant="10" id="HBU-ub-jyU"/>
......@@ -78,6 +82,7 @@
</constraints>
</view>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="pr8-hQ-LpE" secondAttribute="trailing" id="IfP-kb-S0R"/>
<constraint firstItem="pr8-hQ-LpE" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" id="Ih7-S3-ByO"/>
......@@ -86,6 +91,13 @@
</constraints>
</tableViewCellContentView>
<viewLayoutGuide key="safeArea" id="aW0-zy-SZf"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<connections>
<outlet property="awardNum" destination="hkj-qT-nh4" id="xia-dl-dpr"/>
<outlet property="buttonState" destination="dyx-aR-S4p" id="CpN-7w-eAq"/>
<outlet property="subTitle" destination="Go5-7x-zg8" id="UZH-Pl-fPU"/>
<outlet property="title" destination="1Hi-6u-Z8f" id="LHG-Gl-5H3"/>
</connections>
<point key="canvasLocation" x="-343" y="69"/>
</tableViewCell>
</objects>
......
......@@ -9,7 +9,7 @@
NS_ASSUME_NONNULL_BEGIN
@interface WelfareCenterVC : UIViewController
@interface WelfareCenterVC : BaseViewController
@end
......
......@@ -6,13 +6,40 @@
//
#import "WelfareCenterVC.h"
#import "WelfareCenterData.h"
#import "WelfareBoxData.h"
#import "DGUniversalAlertView.h"
#import "WelfareCenterCell.h"
#define Identifier @"WelfareCenterCell"
#import "AppDelegate.h"
#define MAXProcess (6)
@interface WelfareCenterVC ()
@property (nonatomic, strong) NSMutableArray * dataArray;
@property (weak, nonatomic) IBOutlet UITableView *tableView;
@property (strong, nonatomic) IBOutletCollection(UIImageView) NSArray *diamondimages;
@property (weak, nonatomic) IBOutlet UIStackView *stackProcess;
@property (weak, nonatomic) IBOutlet UIImageView *imageLine;
@property (weak, nonatomic) IBOutlet UIButton *treasureBox;
@property (weak, nonatomic) IBOutlet UILabel *currentText;
@property (nonatomic ,assign)NSInteger maxProcess;
@property (nonatomic ,assign)NSInteger coinsProcess;
@property (nonatomic ,assign)NSInteger showA;
@property (nonatomic ,retain)WelfareCenterData *currentData;
- (IBAction)treasureBoxClick:(UIButton *)sender;
@end
@implementation WelfareCenterVC
......@@ -30,9 +57,17 @@
}
- (void)viewDidLoad {
[super viewDidLoad];
[self addLeftItme:[UIImage imageNamed:@"arrow_left"] selecedImage:nil orText:@" " selectedText:nil];
self.title = @"福利中心";
[self loadData];
[self initTableView];
[self navbarClearShadow];
self.view.backgroundColor = [UIColor colorWithHexString:@"#F7BD7C"];
UIImage *image = [UIImage imageNamed:@"DottedLine"];
UIImage *newImage = [UIImage imageWithCGImage:[image CGImage] scale:image.scale orientation:image.imageOrientation];
[self.imageLine setBackgroundColor:[UIColor colorWithPatternImage:newImage]];
// Do any additional setup after loading the view from its nib.
......@@ -46,6 +81,18 @@
[self.tableView registerNib:nib forCellReuseIdentifier:Identifier];
self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
}
#pragma - mark 返回
- (void)leftBarButtonItemAction:(UIButton *)btn{
[self dismissViewControllerAnimated:YES completion:^{
}];
}
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
return 1;
......@@ -56,20 +103,34 @@
}
- (nonnull UITableViewCell *)tableView:(nonnull UITableView *)tableView cellForRowAtIndexPath:(nonnull NSIndexPath *)indexPath {
// ESMusicListData * data = [self.dataArray objectAtIndex:indexPath.row];
WelfareCenterData * data = [self.dataArray objectAtIndex:indexPath.row];
WelfareCenterCell * cell = [tableView dequeueReusableCellWithIdentifier:Identifier forIndexPath:indexPath];
// cell.cellType = self.cellType;
// cell.title.text = data.songName;
// cell.content.text = data.musicCategory;
//// [cell.musicImage setImageWithURL:[NSURL URLWithString:data.musicCover] placeholderImage:[UIImage imageNamed:@"home_top_bg"]];
// [cell.musicImage sd_setImageWithURL:[NSURL URLWithString:data.musicCover] placeholderImage:[UIImage imageNamed:@"home_top_bg"]];
//
// cell.isPlaying = [[MMusicManager shareManager]isPlayingWithModel:data listName:self.albumCategory];
// if (cell.isPlaying) {
// self.indexPath = indexPath;
// }
cell.selectionStyle = UITableViewCellSelectionStyleNone;
cell.title.text = data.title;
cell.subTitle.text = data.description_Content;
cell.status = data.status;
[cell.awardNum setTitle:[NSString stringWithFormat:@"+%@",data.awardCoins] forState:UIControlStateNormal];
WEAKSELF;
cell.buttonBlock = ^(WelfareCenterCell * _Nonnull thisCell) {
NSInteger status = thisCell.status;
NSIndexPath * indexP = [weakSelf.tableView indexPathForCell:thisCell];
WelfareCenterData * data = [weakSelf.dataArray objectAtIndex:indexP.row];
if (status == 0) {
[weakSelf showAD:data];
}else if(status == 1){
[MBProgressHUD showMessage:@"明日再来"];
}else if (status == 2){ //立即领取
[weakSelf receiveThePrize:data];
}else{
[MBProgressHUD showMessage:@"明日再来"];
}
};
return cell;
}
......@@ -115,33 +176,177 @@
- (void)loadData{
WEAKSELF;
[MBProgressHUD showLoading:@"loading"];
// [MBProgressHUD showLoading:@"loading"];
NSMutableDictionary * dic = [[NSMutableDictionary alloc]init];
[dic setObject:@"1" forKey:@"type"];
//请求进度
[[CGNetworkTools shared] getWithAction:task_process parameters:@{} success:^(id _Nonnull response) {
[[CGNetworkTools shared] getWithAction:task_process parameters:dic success:^(id _Nonnull response) {
// [MBProgressHUD hideHUD];
NSDictionary * dic = response[@"result"][@"data"];
if (dic.count) {
weakSelf.maxProcess = [[dic valueForKey:@"max"] integerValue];
weakSelf.coinsProcess = [[dic valueForKey:@"coins"] integerValue];
weakSelf.showA = [[dic valueForKey:@"show"] integerValue];
[weakSelf updateUI];
}
} failure:^(NSError * _Nonnull error) {
// [MBProgressHUD hideHUD];
}];
NSMutableDictionary * dicStat = [[NSMutableDictionary alloc]init];
[dicStat setObject:@"welfare_center_task_list" forKey:@"slotName"];
// 请求列表
[[CGNetworkTools shared] getWithAction:taskListWithStat parameters:@{} success:^(id _Nonnull response) {
[[CGNetworkTools shared] getWithAction:taskListWithStat parameters:dicStat success:^(id _Nonnull response) {
// [MBProgressHUD hideHUD];
if (response) {
NSArray * array = response[@"result"][@"data"][@"userTask"];
if (array) {
weakSelf.dataArray = [WelfareCenterData mj_objectArrayWithKeyValuesArray:array];
[weakSelf.tableView reloadData];
}
}
} failure:^(NSError * _Nonnull error) {
// [MBProgressHUD hideHUD];
}];
}
//MARK: 更新UI
- (void)updateUI{
for (UIImageView *imageView in self.diamondimages) {
if (imageView.tag <= 1000 + self.coinsProcess) {
[imageView setImage:[UIImage imageNamed:@"FinishedDiamonds"]];
} else {
[imageView setImage:[UIImage imageNamed:@"UnfinishedDiamond"]];
}
if (imageView.tag <= 1000 + MAXProcess) { //[1,10]
imageView.hidden = NO;
}else{
imageView.hidden = YES;
}
}
if (self.coinsProcess >= 6) {
[self.treasureBox setImage:[UIImage imageNamed:@"OpenTreasureChest"] forState:UIControlStateNormal];
}else{
[self.treasureBox setImage:[UIImage imageNamed:@"TreasureChestClose"] forState:UIControlStateNormal];
}
self.currentText.text = [NSString stringWithFormat:@"%ld",self.coinsProcess];
[self.tableView reloadData];
}
//MARK: 看广告
- (void)showAD:( WelfareCenterData * ) data{
self.currentData = data;
WEAKSELF;
[IOSADManager shareADManager].advertisingSpace = @"play_adVideo_end_welfareTask";
[[IOSADManager shareADManager] showADType:ADType_Video resultBlock:^(BOOL success) {
if (success) {
//2462
[[CGUserManager shared] addLocCollection:@"play_adVideo_end_welfareTask" value:@""];
if (weakSelf.currentData.sid.length > 0) {
[MBProgressHUD showLoading:@"loading"];
[[CGNetworkTools shared] postWithAction:welfareVideoReport parameters:@{@"sid": weakSelf.currentData.sid} success:^(id _Nonnull response) {
[MBProgressHUD hideHUD];
if ([[response objectForKey:@"status"] integerValue] == 200) {
//
NSLog(@"welfare_video_report success");
weakSelf.currentData.status = 2;
[weakSelf.tableView reloadData];
}
} failure:^(NSError * _Nonnull error) {
[MBProgressHUD hideHUD];
}];
}
} else {
// [MBProgressHUD showError:@"抱歉, 请重试"];
}
}];
}
/*
#pragma mark - Navigation
//MARK: 获取奖励
- (void)receiveThePrize:(WelfareCenterData *) data{
self.currentData = data;
WEAKSELF;
[MBProgressHUD showLoading:@"loading"];
[[CGNetworkTools shared] postWithAction:complete_task parameters:@{@"id": weakSelf.currentData.sid} success:^(id _Nonnull response) {
[MBProgressHUD hideHUD];
if ([[response objectForKey:@"status"] integerValue] == 200) {
NSLog(@"welfare_video_report success");
weakSelf.currentData.status = 1;
weakSelf.coinsProcess += 1;
[weakSelf updateUI];
}
} failure:^(NSError * _Nonnull error) {
[MBProgressHUD hideHUD];
// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
// Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller.
}];
}
*/
//MARK: 打开宝箱
- (IBAction)treasureBoxClick:(UIButton *)sender {
// NSMutableArray * array = [NSMutableArray new];
// WelfareBoxData * data = [[WelfareBoxData alloc]init];
// data.awardNum = 1;
// data.awardType = 1;
// data.boxID = 1;
// data.subType = 2;
// [array addObject:data];
//
// data = [[WelfareBoxData alloc]init];
// data.awardNum = 154;
// data.awardType = 2;
// data.boxID = 2;
// data.subType = 0;
// [array addObject:data];
//
// data = [[WelfareBoxData alloc]init];
// data.awardNum = 8;
// data.awardType = 3;
// data.boxID = 3;
// data.subType = 0;
// [array addObject:data];
//
// DGUniversalAlertView * alertView = [DGUniversalAlertView loadFromNib];
// [alertView configWithWelfareBoxModel:array];
// [alertView showAlertToView:[(AppDelegate *)[UIApplication sharedApplication].delegate getMainWindow]];
//
// return;
WEAKSELF;
[[CGNetworkTools shared] postWithAction:welfare_task_box parameters:@{} success:^(id _Nonnull response) {
if (response) {
if(weakSelf.coinsProcess >= 6){
weakSelf.coinsProcess -= 6;
}
[weakSelf updateUI];
NSArray * array = response[@"result"][@"data"];
NSMutableArray * dataArray = [WelfareBoxData mj_objectArrayWithKeyValuesArray:array];
DGUniversalAlertView * alertView = [DGUniversalAlertView loadFromNib];
[alertView configWithWelfareBoxModel:dataArray];
[alertView showAlertToView:weakSelf.view];
}
} failure:^(NSError * _Nonnull error) {
}];
}
@end
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="17156" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17125"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="WelfareCenterVC">
<connections>
<outlet property="currentText" destination="3ar-1p-GGl" id="FTa-d6-TLA"/>
<outlet property="imageLine" destination="eOX-rq-v0m" id="nQi-CD-Le5"/>
<outlet property="stackProcess" destination="S8p-gf-4z7" id="cFK-Aa-zoG"/>
<outlet property="tableView" destination="cLQ-3z-U9W" id="lrz-YI-VgV"/>
<outlet property="treasureBox" destination="PvX-s8-Pxm" id="CFC-be-Iwr"/>
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
<outletCollection property="diamondimages" destination="kBi-Eb-3V8" id="275-Zc-bCZ"/>
<outletCollection property="diamondimages" destination="1z4-3O-sod" id="QnW-xd-fu7"/>
<outletCollection property="diamondimages" destination="bNv-QM-tgZ" id="79A-7j-6mc"/>
<outletCollection property="diamondimages" destination="Rvp-NU-SUN" id="ewG-56-kBw"/>
<outletCollection property="diamondimages" destination="hBp-he-bnq" id="kcd-7r-v3k"/>
<outletCollection property="diamondimages" destination="Jj2-BA-D4N" id="vgd-VO-AIQ"/>
<outletCollection property="diamondimages" destination="bwc-i7-rSf" id="Dyt-A2-bGp"/>
<outletCollection property="diamondimages" destination="H5W-Ga-MKH" id="Wtz-4Z-QhQ"/>
<outletCollection property="diamondimages" destination="Kx6-a8-hM2" id="7fD-hw-ReK"/>
<outletCollection property="diamondimages" destination="IZK-xN-ed9" id="GvK-gQ-bhe"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="BottomOfTheBackground" translatesAutoresizingMaskIntoConstraints="NO" id="Hz0-KR-A7M">
<rect key="frame" x="0.0" y="539" width="375" height="128"/>
</imageView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="D2D-AV-eup">
<rect key="frame" x="0.0" y="0.0" width="375" height="85"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="集齐6颗钻石可获得宝箱奖励" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="CdA-K9-h8P">
<rect key="frame" x="11" y="10" width="214.5" height="24"/>
<fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="eOX-rq-v0m">
<rect key="frame" x="15" y="54.5" width="300" height="1"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="0Br-kg-Mkw"/>
</constraints>
</imageView>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="BackgroundLight" translatesAutoresizingMaskIntoConstraints="NO" id="CTR-NW-hAk">
<rect key="frame" x="297.5" y="12.5" width="85" height="85"/>
<constraints>
<constraint firstAttribute="height" constant="85" id="isH-zN-fKh"/>
<constraint firstAttribute="width" secondItem="CTR-NW-hAk" secondAttribute="height" multiplier="1:1" id="z6A-10-2ER"/>
</constraints>
</imageView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="PvX-s8-Pxm">
<rect key="frame" x="315" y="35" width="50" height="40"/>
<constraints>
<constraint firstAttribute="width" constant="50" id="AqL-sD-MtI"/>
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="50" id="EQP-m9-4dB"/>
<constraint firstAttribute="height" constant="40" id="pK3-VH-oEx"/>
</constraints>
<state key="normal" image="TreasureChestClose"/>
<connections>
<action selector="treasureBoxClick:" destination="-1" eventType="touchUpInside" id="g16-Zg-dOx"/>
</connections>
</button>
<stackView opaque="NO" contentMode="scaleToFill" distribution="equalSpacing" alignment="center" translatesAutoresizingMaskIntoConstraints="NO" id="S8p-gf-4z7">
<rect key="frame" x="15" y="35" width="280" height="40"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" tag="1001" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="UnfinishedDiamond" translatesAutoresizingMaskIntoConstraints="NO" id="1z4-3O-sod">
<rect key="frame" x="0.0" y="6.5" width="27" height="27"/>
</imageView>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" tag="1002" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="UnfinishedDiamond" translatesAutoresizingMaskIntoConstraints="NO" id="bNv-QM-tgZ">
<rect key="frame" x="28" y="6.5" width="27" height="27"/>
</imageView>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" tag="1003" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="UnfinishedDiamond" translatesAutoresizingMaskIntoConstraints="NO" id="Rvp-NU-SUN">
<rect key="frame" x="56" y="6.5" width="27" height="27"/>
</imageView>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" tag="1004" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="UnfinishedDiamond" translatesAutoresizingMaskIntoConstraints="NO" id="kBi-Eb-3V8">
<rect key="frame" x="84.5" y="6.5" width="27" height="27"/>
</imageView>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" tag="1005" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="UnfinishedDiamond" translatesAutoresizingMaskIntoConstraints="NO" id="hBp-he-bnq">
<rect key="frame" x="112.5" y="6.5" width="27" height="27"/>
</imageView>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" tag="1006" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="UnfinishedDiamond" translatesAutoresizingMaskIntoConstraints="NO" id="Jj2-BA-D4N">
<rect key="frame" x="140.5" y="6.5" width="27" height="27"/>
</imageView>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" tag="1007" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="UnfinishedDiamond" translatesAutoresizingMaskIntoConstraints="NO" id="bwc-i7-rSf">
<rect key="frame" x="168.5" y="6.5" width="27" height="27"/>
</imageView>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" tag="1008" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="UnfinishedDiamond" translatesAutoresizingMaskIntoConstraints="NO" id="H5W-Ga-MKH">
<rect key="frame" x="197" y="6.5" width="27" height="27"/>
</imageView>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" tag="1009" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="UnfinishedDiamond" translatesAutoresizingMaskIntoConstraints="NO" id="Kx6-a8-hM2">
<rect key="frame" x="225" y="6.5" width="27" height="27"/>
</imageView>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" tag="1010" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="UnfinishedDiamond" translatesAutoresizingMaskIntoConstraints="NO" id="IZK-xN-ed9">
<rect key="frame" x="253" y="6.5" width="27" height="27"/>
</imageView>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="height" constant="40" id="FH1-a1-QJK"/>
</constraints>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="RPC-kr-Miv">
<rect key="frame" x="316" y="6.5" width="48" height="20.5"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="MissionDiamond" translatesAutoresizingMaskIntoConstraints="NO" id="siR-JQ-5Ee">
<rect key="frame" x="0.0" y="0.0" width="17" height="20.5"/>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=":" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="sAl-Iv-fIQ">
<rect key="frame" x="17" y="0.0" width="5" height="20.5"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="3" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="3ar-1p-GGl">
<rect key="frame" x="22" y="0.0" width="10.5" height="20.5"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="1" green="0.35294117650000001" blue="0.2666666667" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="/6" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="8j4-7J-gwL">
<rect key="frame" x="32.5" y="0.0" width="15.5" height="20.5"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</stackView>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="PvX-s8-Pxm" firstAttribute="leading" secondItem="S8p-gf-4z7" secondAttribute="trailing" constant="20" id="89X-7k-ijZ"/>
<constraint firstItem="eOX-rq-v0m" firstAttribute="centerY" secondItem="S8p-gf-4z7" secondAttribute="centerY" id="FCp-gm-wYP"/>
<constraint firstItem="S8p-gf-4z7" firstAttribute="leading" secondItem="D2D-AV-eup" secondAttribute="leading" constant="15" id="Hob-ud-Gi2"/>
<constraint firstItem="S8p-gf-4z7" firstAttribute="centerY" secondItem="PvX-s8-Pxm" secondAttribute="centerY" id="J7o-Gj-r1w"/>
<constraint firstItem="PvX-s8-Pxm" firstAttribute="leading" secondItem="eOX-rq-v0m" secondAttribute="trailing" id="L1t-z1-uiU"/>
<constraint firstItem="PvX-s8-Pxm" firstAttribute="top" secondItem="RPC-kr-Miv" secondAttribute="bottom" constant="8" id="Q76-5G-gA0"/>
<constraint firstItem="CTR-NW-hAk" firstAttribute="centerY" secondItem="PvX-s8-Pxm" secondAttribute="centerY" id="WfN-EX-VKW"/>
<constraint firstItem="RPC-kr-Miv" firstAttribute="centerX" secondItem="PvX-s8-Pxm" secondAttribute="centerX" id="ZnZ-nM-S50"/>
<constraint firstItem="CdA-K9-h8P" firstAttribute="top" secondItem="D2D-AV-eup" secondAttribute="top" constant="10" id="i4a-bl-9sN"/>
<constraint firstItem="CTR-NW-hAk" firstAttribute="centerX" secondItem="PvX-s8-Pxm" secondAttribute="centerX" id="ptb-gv-XiT"/>
<constraint firstAttribute="bottom" secondItem="PvX-s8-Pxm" secondAttribute="bottom" constant="10" id="qm8-6b-fpD"/>
<constraint firstAttribute="height" constant="85" id="s0L-kX-UPf"/>
<constraint firstItem="eOX-rq-v0m" firstAttribute="leading" secondItem="S8p-gf-4z7" secondAttribute="leading" id="skH-3l-nIp"/>
<constraint firstItem="CdA-K9-h8P" firstAttribute="leading" secondItem="D2D-AV-eup" secondAttribute="leading" constant="11" id="w1v-b0-Oo6"/>
<constraint firstAttribute="trailing" secondItem="PvX-s8-Pxm" secondAttribute="trailing" constant="10" id="wDk-D9-G2s"/>
</constraints>
</view>
<tableView clipsSubviews="YES" contentMode="scaleToFill" misplaced="YES" alwaysBounceVertical="YES" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="cLQ-3z-U9W">
<rect key="frame" x="0.0" y="74" width="375" height="582"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<color key="sectionIndexBackgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<connections>
<outlet property="dataSource" destination="-1" id="YN3-rf-K4G"/>
<outlet property="delegate" destination="-1" id="ifg-sF-Ftu"/>
</connections>
</tableView>
</subviews>
<viewLayoutGuide key="safeArea" id="Q5M-cg-NOt"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="Q5M-cg-NOt" firstAttribute="trailing" secondItem="cLQ-3z-U9W" secondAttribute="trailing" id="028-KM-XZz"/>
<constraint firstItem="cLQ-3z-U9W" firstAttribute="top" secondItem="D2D-AV-eup" secondAttribute="bottom" id="5wn-Zp-bTJ"/>
<constraint firstItem="cLQ-3z-U9W" firstAttribute="leading" secondItem="Q5M-cg-NOt" secondAttribute="leading" id="7pf-5Q-Gok"/>
<constraint firstAttribute="bottom" secondItem="cLQ-3z-U9W" secondAttribute="bottom" id="8VV-5W-bB8"/>
<constraint firstItem="Hz0-KR-A7M" firstAttribute="leading" secondItem="Q5M-cg-NOt" secondAttribute="leading" id="RcL-5a-amf"/>
<constraint firstItem="Q5M-cg-NOt" firstAttribute="trailing" secondItem="Hz0-KR-A7M" secondAttribute="trailing" id="VHd-ye-32S"/>
<constraint firstItem="Q5M-cg-NOt" firstAttribute="bottom" secondItem="Hz0-KR-A7M" secondAttribute="bottom" id="dhz-m5-vd3"/>
<constraint firstItem="Q5M-cg-NOt" firstAttribute="trailing" secondItem="D2D-AV-eup" secondAttribute="trailing" id="dvA-wT-3C2"/>
<constraint firstItem="D2D-AV-eup" firstAttribute="leading" secondItem="Q5M-cg-NOt" secondAttribute="leading" id="jnl-OE-fh8"/>
<constraint firstItem="D2D-AV-eup" firstAttribute="top" secondItem="Q5M-cg-NOt" secondAttribute="top" id="xa4-d3-lOH"/>
</constraints>
<point key="canvasLocation" x="-143.19999999999999" y="62.518740629685162"/>
</view>
</objects>
<resources>
<image name="BackgroundLight" width="147.5" height="150"/>
<image name="BottomOfTheBackground" width="375" height="128"/>
<image name="MissionDiamond" width="17" height="15"/>
<image name="TreasureChestClose" width="48" height="40"/>
<image name="UnfinishedDiamond" width="27" height="27"/>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
</resources>
</document>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment