Commit 76679d2c authored by lmj_521aiau@163.com's avatar lmj_521aiau@163.com

1.0.0 fix ui

parent 8e6a7178
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>GYDemo.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>5</integer>
</dict>
</dict>
</dict>
</plist>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>GYDemo.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>7</integer>
</dict>
</dict>
</dict>
</plist>
//
// GYGiftAlertView.h
// GYDemo
//
// Created by 明津李 on 2020/10/20.
//
#import <UIKit/UIKit.h>
#import "GYOpenBoxModel.h"
#import "GYWheelSurfModel.h"
NS_ASSUME_NONNULL_BEGIN
@interface GYGiftAlertView : UIView
@property(nonatomic, strong) GYOpenBoxModel * boxModel;
@property(nonatomic, strong) GYWheelSurfModel * wheelSurfModel;
- (void)show:(UIView *)superView;
@end
NS_ASSUME_NONNULL_END
//
// GYGiftAlertView.m
// GYDemo
//
// Created by 明津李 on 2020/10/20.
//
#import "GYGiftAlertView.h"
#import "GYGiftCell.h"
@interface GYGiftAlertView ()<UICollectionViewDelegate,UICollectionViewDataSource,UICollectionViewDelegateFlowLayout>
@property (nonatomic, weak) IBOutlet UIImageView * giftHeaderImv;
@property (nonatomic, weak) IBOutlet UIView * bgView;
@property (nonatomic, weak) IBOutlet UIView * giftBgView;
@property (nonatomic, strong) CAGradientLayer * gradientLayer;
@property (nonatomic, weak) IBOutlet UICollectionView * collectionView;
@property (nonatomic, strong) NSMutableArray * dataSource;
@end
@implementation GYGiftAlertView
- (void)awakeFromNib{
[super awakeFromNib];
self.hidden = YES;
self.bgView.backgroundColor = [UIColor clearColor];
self.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.3];
// UICollectionViewFlowLayout *flowLayout = [[UICollectionViewFlowLayout alloc] init];
// flowLayout.sectionInset=UIEdgeInsetsMake(0, 0, 0, 0);
// flowLayout.minimumLineSpacing = 0.00;
// flowLayout.minimumInteritemSpacing = 0.00;
// [flowLayout setScrollDirection:UICollectionViewScrollDirectionVertical];//滚动方向
_collectionView.backgroundColor = [UIColor clearColor];
//设置代理
_collectionView.delegate = self;
_collectionView.dataSource = self;
_collectionView.showsVerticalScrollIndicator = NO;
// _collectionView.collectionViewLayout = flowLayout;
[_collectionView registerNib:[UINib nibWithNibName:@"GYGiftCell" bundle:[NSBundle mainBundle]] forCellWithReuseIdentifier:@"GYGiftCell"];
if (@available(iOS 11.0, *)) {
_collectionView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
}
// gradient
_gradientLayer = [CAGradientLayer layer];
_gradientLayer.frame = _giftBgView.bounds;
_gradientLayer.startPoint = CGPointMake(0.5, 0.53);
_gradientLayer.endPoint = CGPointMake(0.5, 1);
_gradientLayer.colors = @[(__bridge id)[UIColor colorWithRed:249/255.0 green:234/255.0 blue:192/255.0 alpha:1.0].CGColor, (__bridge id)[UIColor colorWithRed:255/255.0 green:251/255.0 blue:240/255.0 alpha:1.0].CGColor];
_gradientLayer.locations = @[@(0), @(1.0f)];
_giftBgView.layer.cornerRadius = 10;
_giftBgView.layer.shadowColor = [UIColor colorWithRed:171/255.0 green:94/255.0 blue:26/255.0 alpha:0.3].CGColor;
_giftBgView.layer.shadowOffset = CGSizeMake(0,2);
_giftBgView.layer.shadowOpacity = 1;
_giftBgView.layer.shadowRadius = 4;
[_gradientLayer removeFromSuperlayer];
[_giftBgView.layer addSublayer:_gradientLayer];
}
- (void)layoutSubviews{
[super layoutSubviews];
}
- (void)setBoxModel:(GYOpenBoxModel *)boxModel{
//奖励类型 1 水滴 2 果子 3 种子 4 金币 5 加速剂 6 现金红包
_boxModel = boxModel;
}
- (void)setWheelSurfModel:(GYWheelSurfModel *)wheelSurfModel{
//奖励类型 1 水滴 2 果子 3 种子 4 金币 5 加速剂 6 现金红包
_wheelSurfModel = wheelSurfModel;
self.dataSource = [NSMutableArray new];
switch (wheelSurfModel.awardType) {
case 3:
self.dataSource = wheelSurfModel.extModels;
break;
case 4:
[self.dataSource addObject:[GYExtModel new]];
break;
case 5:
break;
case 6:
break;
default:
break;
}
_giftHeaderImv.image = [UIImage imageNamed:[NSString stringWithFormat:@"gift_header_%ld", (long)wheelSurfModel.awardType]];
[self.giftBgView bringSubviewToFront:self.collectionView];
[self.collectionView reloadData];
}
- (IBAction)cancelBtn:(UIButton *)sender{
[self dismiss];
}
- (IBAction)confirmBtn:(UIButton *)sender{
[self dismiss];
}
- (void)show:(UIView *)superView{
self.hidden = NO;
CAKeyframeAnimation* animation = [CAKeyframeAnimation animationWithKeyPath:@"transform"];
animation.duration = 0.5;
NSMutableArray *values = [NSMutableArray array];
[values addObject:[NSValue valueWithCATransform3D:CATransform3DMakeScale(0.1, 0.1, 1.0)]];
[values addObject:[NSValue valueWithCATransform3D:CATransform3DMakeScale(1.2, 1.2, 1.0)]];
[values addObject:[NSValue valueWithCATransform3D:CATransform3DMakeScale(0.9, 0.9, 1.0)]];
[values addObject:[NSValue valueWithCATransform3D:CATransform3DMakeScale(1.0, 1.0, 1.0)]];
animation.values = values;
[_bgView.layer addAnimation:animation forKey:nil];
}
- (void)dismiss{
CAKeyframeAnimation* animation = [CAKeyframeAnimation animationWithKeyPath:@"transform"];
animation.duration = 0.33;
NSMutableArray *values = [NSMutableArray array];
[values addObject:[NSValue valueWithCATransform3D:CATransform3DMakeScale(0.9, 0.9, 1.0)]];
[values addObject:[NSValue valueWithCATransform3D:CATransform3DMakeScale(0.5, 0.5, 1.0)]];
[values addObject:[NSValue valueWithCATransform3D:CATransform3DMakeScale(0.1, 0.1, 1.0)]];
[values addObject:[NSValue valueWithCATransform3D:CATransform3DMakeScale(0.0, 0.0, 1.0)]];
animation.values = values;
[_bgView.layer addAnimation:animation forKey:nil];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.30 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
self.hidden = YES;
[self removeFromSuperview];
});
}
#pragma mark -----UICollecitonViewDelegate
//每个分区边距
- (UIEdgeInsets)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout insetForSectionAtIndex:(NSInteger)section
{
return UIEdgeInsetsMake(0, 0, 0, 0);
}
//item的大小
-(CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath
{
return CGSizeMake(collectionView.frame.size.width/self.dataSource.count, 108);
}
//区头的大小
-(CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout referenceSizeForHeaderInSection:(NSInteger)section
{
return CGSizeZero;
}
//区尾的大小
-(CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout referenceSizeForFooterInSection:(NSInteger)section
{
return CGSizeZero;
}
//item的行间距
-(CGFloat)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout minimumLineSpacingForSectionAtIndex:(NSInteger)section
{
return CGFLOAT_MIN;
}
//item的间距
-(CGFloat)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout minimumInteritemSpacingForSectionAtIndex:(NSInteger)section
{
return CGFLOAT_MIN;
}
//每个分区的item个数
-(NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section
{
return self.dataSource.count;
}
//每个cell的样式
-(UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
{
GYGiftCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"GYGiftCell" forIndexPath:indexPath];
GYExtModel * model = self.dataSource[indexPath.row];
if (_wheelSurfModel.awardType == 4) {
cell.giftImv.image = [UIImage imageNamed:@"gift_gold"];
cell.numLab.text = [NSString stringWithFormat:@"+%@", _wheelSurfModel.awardNum];
}else if (_wheelSurfModel.awardType == 4){
cell.giftImv.image = [UIImage imageNamed:[NSString stringWithFormat:@"gift_seed_%ld", model.id]];
cell.numLab.text = [NSString stringWithFormat:@"+%ld", model.num];
}
return cell;
}
//cell点击事件
-(void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
}
@end
This diff is collapsed.
//
// GYGiftCell.h
// GYDemo
//
// Created by 明津李 on 2020/10/21.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface GYGiftCell : UICollectionViewCell
@property (nonatomic, weak) IBOutlet UIImageView * giftImv;
@property (nonatomic, weak) IBOutlet UILabel * numLab;
@end
NS_ASSUME_NONNULL_END
//
// GYGiftCell.m
// GYDemo
//
// Created by 明津李 on 2020/10/21.
//
#import "GYGiftCell.h"
@implementation GYGiftCell
- (void)awakeFromNib {
[super awakeFromNib];
// Initialization code
}
@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>
<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"/>
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" id="gTV-IL-0wX" customClass="GYGiftCell">
<rect key="frame" x="0.0" y="0.0" width="163" height="158"/>
<autoresizingMask key="autoresizingMask"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
<rect key="frame" x="0.0" y="0.0" width="163" height="158"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="gift_seed_1" translatesAutoresizingMaskIntoConstraints="NO" id="171-mY-Szm">
<rect key="frame" x="61" y="48" width="41" height="46"/>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="+1" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="kiQ-IN-LG2">
<rect key="frame" x="74" y="104" width="15.5" height="17"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<nil key="textColor"/>
<color key="highlightedColor" red="0.5607843137254902" green="0.29803921568627451" blue="0.027450980392156862" alpha="0.5" colorSpace="calibratedRGB"/>
</label>
</subviews>
</view>
<viewLayoutGuide key="safeArea" id="SEy-5g-ep8"/>
<constraints>
<constraint firstItem="171-mY-Szm" firstAttribute="centerY" secondItem="gTV-IL-0wX" secondAttribute="centerY" multiplier="0.9" id="Kl2-ma-YxH"/>
<constraint firstItem="kiQ-IN-LG2" firstAttribute="centerX" secondItem="171-mY-Szm" secondAttribute="centerX" id="RsR-LS-6BH"/>
<constraint firstItem="kiQ-IN-LG2" firstAttribute="top" secondItem="171-mY-Szm" secondAttribute="bottom" constant="10" id="SeE-GA-9tk"/>
<constraint firstItem="171-mY-Szm" firstAttribute="centerX" secondItem="gTV-IL-0wX" secondAttribute="centerX" id="vNq-a3-EZS"/>
</constraints>
<size key="customSize" width="163" height="158"/>
<connections>
<outlet property="giftImv" destination="171-mY-Szm" id="Pml-mw-e9M"/>
<outlet property="numLab" destination="kiQ-IN-LG2" id="2yK-Lh-PDC"/>
</connections>
<point key="canvasLocation" x="219.56521739130437" y="91.071428571428569"/>
</collectionViewCell>
</objects>
<resources>
<image name="gift_seed_1" width="41" height="46"/>
</resources>
</document>
//
// GYOrderAlertView.h
// GYDemo
//
// Created by 明津李 on 2020/10/21.
//
#import <UIKit/UIKit.h>
#import "GYOrderInfoModel.h"
NS_ASSUME_NONNULL_BEGIN
@interface GYOrderAlertView : UIView
@property (nonatomic, assign) GYOrderInfoModel * model;
- (void)show:(UIView *)superView;
@end
NS_ASSUME_NONNULL_END
//
// GYOrderAlertView.m
// GYDemo
//
// Created by 明津李 on 2020/10/21.
//
#import "GYOrderAlertView.h"
#import "GYOrderInfoCell.h"
#import "AppDelegate.h"
@interface GYOrderAlertView ()<UICollectionViewDelegate,UICollectionViewDataSource,UICollectionViewDelegateFlowLayout>
@property (nonatomic, weak) IBOutlet UIImageView * orderHeaderImv;
@property (nonatomic, weak) IBOutlet UILabel * orderLevelLab;
@property (nonatomic, weak) IBOutlet UIView * bgView;
@property (nonatomic, weak) IBOutlet UIView * giftBgView;
@property (nonatomic, weak) IBOutlet UIButton * confirmBtn;
@property (nonatomic, strong) CAGradientLayer * gradientLayer;
@property (nonatomic, weak) IBOutlet UICollectionView * collectionView;
@property (nonatomic, strong) NSMutableArray * dataSource;
@property (nonatomic, weak) IBOutlet UILabel * orderDetailsLab;
@end
@implementation GYOrderAlertView
- (void)awakeFromNib{
[super awakeFromNib];
self.hidden = YES;
self.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.3];
_bgView.backgroundColor = [UIColor clearColor];
// UICollectionViewFlowLayout *flowLayout = [[UICollectionViewFlowLayout alloc] init];
// flowLayout.sectionInset=UIEdgeInsetsMake(0, 0, 0, 0);
// flowLayout.minimumLineSpacing = 0.00;
// flowLayout.minimumInteritemSpacing = 0.00;
// [flowLayout setScrollDirection:UICollectionViewScrollDirectionVertical];//滚动方向
_collectionView.backgroundColor = [UIColor clearColor];
//设置代理
_collectionView.delegate = self;
_collectionView.dataSource = self;
_collectionView.showsVerticalScrollIndicator = NO;
// _collectionView.collectionViewLayout = flowLayout;
[_collectionView registerNib:[UINib nibWithNibName:@"GYOrderInfoCell" bundle:[NSBundle mainBundle]] forCellWithReuseIdentifier:@"GYOrderInfoCell"];
if (@available(iOS 11.0, *)) {
_collectionView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
}
// gradient
_gradientLayer = [CAGradientLayer layer];
_gradientLayer.frame = _giftBgView.bounds;
_gradientLayer.startPoint = CGPointMake(0.5, 0.53);
_gradientLayer.endPoint = CGPointMake(0.5, 1);
_gradientLayer.colors = @[(__bridge id)[UIColor colorWithRed:249/255.0 green:234/255.0 blue:192/255.0 alpha:1.0].CGColor, (__bridge id)[UIColor colorWithRed:255/255.0 green:251/255.0 blue:240/255.0 alpha:1.0].CGColor];
_gradientLayer.locations = @[@(0), @(1.0f)];
_gradientLayer.cornerRadius = 10;
_giftBgView.layer.cornerRadius = 10;
_giftBgView.layer.shadowColor = [UIColor colorWithRed:171/255.0 green:94/255.0 blue:26/255.0 alpha:0.3].CGColor;
_giftBgView.layer.shadowOffset = CGSizeMake(0,2);
_giftBgView.layer.shadowOpacity = 1;
_giftBgView.layer.shadowRadius = 4;
[_gradientLayer removeFromSuperlayer];
[_giftBgView.layer addSublayer:_gradientLayer];
}
- (void)setModel:(GYOrderInfoModel *)model{
_model = model;
_dataSource = _model.orderDetailModels;
NSString * amt = [NSString stringWithFormat:@"%.2f", [_model.awardCash integerValue]*1.0/100];
NSString * amtStr = [NSString stringWithFormat:@"完成当前订单将获得%@元", amt];
NSMutableAttributedString * att = [[NSMutableAttributedString alloc] initWithString:amtStr];
[att addAttributes:@{NSFontAttributeName:[UIFont systemFontOfSize:30], NSForegroundColorAttributeName:kColorWithRGB(255, 145, 40)} range:[amtStr rangeOfString:amt]];
[att addAttributes:@{NSFontAttributeName:[UIFont systemFontOfSize:17]} range:[amtStr rangeOfString:@"元"]];
[att addAttributes:@{NSFontAttributeName:[UIFont systemFontOfSize:17]} range:[amtStr rangeOfString:@"完成当前订单将获得"]];
_orderDetailsLab.attributedText = att;
_orderLevelLab.text = [NSString stringWithFormat:@"%ld级订单", (long)model.orderLevel];
_confirmBtn.enabled = model.status == 1;
[self.giftBgView bringSubviewToFront:self.collectionView];
[self.giftBgView bringSubviewToFront:self.orderDetailsLab];
[self.collectionView reloadData];
}
- (void)layoutSubviews{
[super layoutSubviews];
}
- (void)refreshDataSource{
[[CGNetworkTools shared] getWithAction:getOrderInfo parameters:@{} success:^(id _Nonnull response) {
NSDictionary * orderDic = [[response objectForKey:@"result"] objectForKey:@"data"];
if ([[response objectForKey:@"status"] integerValue] == 200) {
NSData *data = [NSJSONSerialization dataWithJSONObject:orderDic options:NSJSONWritingFragmentsAllowed error:nil];
NSString * jsonStr = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
}
GYOrderInfoModel * model = [[GYOrderInfoModel alloc] init];
[model setValuesForKeysWithDictionary:orderDic];
model.orderDetailModels = [NSMutableArray new];
for (NSDictionary * dic in model.farmOrderDataList){
GYOrderDetailsModel * detailsModel = [[GYOrderDetailsModel alloc] init];
[detailsModel setValuesForKeysWithDictionary:dic];
[model.orderDetailModels addObject:detailsModel];
}
self.model = model;
} failure:^(NSError * _Nonnull error) {
}];
}
- (IBAction)cancelBtn:(UIButton *)sender{
[self dismiss];
}
- (IBAction)confirmBtn:(UIButton *)sender{
[[CGNetworkTools shared] postWithAction:DrawOrder parameters:@{} success:^(id _Nonnull response) {
[(AppDelegate*)[UIApplication sharedApplication].delegate ios_getOrderData];
[self refreshDataSource];
// [self dismiss];
} failure:^(NSError * _Nonnull error) {
}];
}
- (void)show:(UIView *)superView{
self.hidden = NO;
CAKeyframeAnimation* animation = [CAKeyframeAnimation animationWithKeyPath:@"transform"];
animation.duration = 0.5;
NSMutableArray *values = [NSMutableArray array];
[values addObject:[NSValue valueWithCATransform3D:CATransform3DMakeScale(0.1, 0.1, 1.0)]];
[values addObject:[NSValue valueWithCATransform3D:CATransform3DMakeScale(1.2, 1.2, 1.0)]];
[values addObject:[NSValue valueWithCATransform3D:CATransform3DMakeScale(0.9, 0.9, 1.0)]];
[values addObject:[NSValue valueWithCATransform3D:CATransform3DMakeScale(1.0, 1.0, 1.0)]];
animation.values = values;
[_bgView.layer addAnimation:animation forKey:nil];
}
- (void)dismiss{
CAKeyframeAnimation* animation = [CAKeyframeAnimation animationWithKeyPath:@"transform"];
animation.duration = 0.33;
NSMutableArray *values = [NSMutableArray array];
[values addObject:[NSValue valueWithCATransform3D:CATransform3DMakeScale(0.9, 0.9, 1.0)]];
[values addObject:[NSValue valueWithCATransform3D:CATransform3DMakeScale(0.5, 0.5, 1.0)]];
[values addObject:[NSValue valueWithCATransform3D:CATransform3DMakeScale(0.1, 0.1, 1.0)]];
[values addObject:[NSValue valueWithCATransform3D:CATransform3DMakeScale(0.0, 0.0, 1.0)]];
animation.values = values;
[_bgView.layer addAnimation:animation forKey:nil];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.30 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
self.hidden = YES;
[self removeFromSuperview];
});
}
#pragma mark -----UICollecitonViewDelegate
//每个分区边距
- (UIEdgeInsets)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout insetForSectionAtIndex:(NSInteger)section
{
return UIEdgeInsetsMake(0, 0, 0, 0);
}
//item的大小
-(CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath
{
return CGSizeMake(collectionView.frame.size.width, 72);
}
//区头的大小
-(CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout referenceSizeForHeaderInSection:(NSInteger)section
{
return CGSizeZero;
}
//区尾的大小
-(CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout referenceSizeForFooterInSection:(NSInteger)section
{
return CGSizeZero;
}
//item的行间距
-(CGFloat)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout minimumLineSpacingForSectionAtIndex:(NSInteger)section
{
return KScaleWidth(0);
}
//item的间距
-(CGFloat)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout minimumInteritemSpacingForSectionAtIndex:(NSInteger)section
{
return CGFLOAT_MIN;
}
//每个分区的item个数
-(NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section
{
return self.dataSource.count;
}
//每个cell的样式
-(UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
{
GYOrderInfoCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"GYOrderInfoCell" forIndexPath:indexPath];
GYOrderDetailsModel * model = self.dataSource[indexPath.row];
cell.seedImv.image = [UIImage imageNamed:[NSString stringWithFormat:@"order_seed_%ld", model.id]];
cell.nameLab.text = model.name;
cell.progressLab.text = [NSString stringWithFormat:@"%ld/%ld", (long)model.ownNum, (long)model.targetNum];
cell.progress = model.ownNum*1.0/model.targetNum;
return cell;
}
//cell点击事件
-(void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
}
@end
This diff is collapsed.
//
// GYOrderInfoCell.h
// GYDemo
//
// Created by 明津李 on 2020/10/21.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface GYOrderInfoCell : UICollectionViewCell
@property (nonatomic, weak) IBOutlet UIImageView * seedImv;
@property (nonatomic, weak) IBOutlet UILabel * nameLab;
@property (nonatomic, weak) IBOutlet UILabel * progressLab;
@property (nonatomic, assign) float progress;
@property (nonatomic, weak) IBOutlet UIView * progressBgView;
@end
NS_ASSUME_NONNULL_END
//
// GYOrderInfoCell.m
// GYDemo
//
// Created by 明津李 on 2020/10/21.
//
#import "GYOrderInfoCell.h"
#import "WTProgressView.h"
@interface GYOrderInfoCell ()
@property (nonatomic, strong) WTProgressView * progressView;
@end
@implementation GYOrderInfoCell
- (void)awakeFromNib {
[super awakeFromNib];
_progressBgView.backgroundColor = [UIColor clearColor];
_progressBgView.clipsToBounds = YES;
_progressView = [[WTProgressView alloc] initWithFrame:self.progressBgView.bounds];
_progressView.backgroundColor = kColorWithRGB(143, 76, 7);
_progressView.layer.cornerRadius = self.progressBgView.bounds.size.height/2;
_progressView.layer.borderWidth = 1;
_progressView.layer.borderColor = kColorWithRGB(143, 76, 7).CGColor;
_progressView.gradientColors = @[kColorWithRGB(70, 227, 43)];
[self.progressBgView addSubview:_progressView];
}
- (void)setProgress:(float)progress{
_progress = progress;
_progressView.progress = _progress;
}
@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>
<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"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" id="gTV-IL-0wX" customClass="GYOrderInfoCell">
<rect key="frame" x="0.0" y="0.0" width="299" height="82"/>
<autoresizingMask key="autoresizingMask"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
<rect key="frame" x="0.0" y="0.0" width="299" height="82"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="order_seed_1" translatesAutoresizingMaskIntoConstraints="NO" id="vl8-v4-bIs">
<rect key="frame" x="13" y="16" width="50" height="50"/>
<constraints>
<constraint firstAttribute="height" constant="50" id="34R-LP-fEi"/>
<constraint firstAttribute="width" constant="50" id="fVH-PB-VUY"/>
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="2vD-CS-9gG">
<rect key="frame" x="85" y="23" width="37.5" height="18"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<color key="textColor" red="0.56078431370000004" green="0.29803921570000003" blue="0.0039215686269999999" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="apo-8W-rCz">
<rect key="frame" x="85" y="48" width="100" height="12"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstAttribute="width" constant="100" id="clb-WJ-gwx"/>
<constraint firstAttribute="height" constant="12" id="wsS-ng-5vf"/>
</constraints>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0/10" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="fe6-0h-cNd">
<rect key="frame" x="195" y="47" width="24.5" height="14.5"/>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<color key="textColor" red="1" green="0.5490196078431373" blue="0.15686274509803921" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</view>
<viewLayoutGuide key="safeArea" id="SEy-5g-ep8"/>
<constraints>
<constraint firstItem="fe6-0h-cNd" firstAttribute="leading" secondItem="apo-8W-rCz" secondAttribute="trailing" constant="10" id="3GV-Cg-aeU"/>
<constraint firstItem="apo-8W-rCz" firstAttribute="leading" secondItem="2vD-CS-9gG" secondAttribute="leading" id="3qE-vu-pTK"/>
<constraint firstItem="vl8-v4-bIs" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" constant="13" id="5C8-fj-s1H"/>
<constraint firstItem="fe6-0h-cNd" firstAttribute="centerY" secondItem="apo-8W-rCz" secondAttribute="centerY" id="BH6-Fm-ab3"/>
<constraint firstItem="apo-8W-rCz" firstAttribute="top" secondItem="2vD-CS-9gG" secondAttribute="bottom" constant="7" id="QtD-ea-M57"/>
<constraint firstItem="2vD-CS-9gG" firstAttribute="bottom" secondItem="vl8-v4-bIs" secondAttribute="centerY" id="SfD-xT-NqY"/>
<constraint firstItem="2vD-CS-9gG" firstAttribute="leading" secondItem="vl8-v4-bIs" secondAttribute="trailing" constant="22" id="ViA-We-0Xn"/>
<constraint firstItem="vl8-v4-bIs" firstAttribute="centerY" secondItem="gTV-IL-0wX" secondAttribute="centerY" id="vag-Mo-ng3"/>
</constraints>
<size key="customSize" width="299" height="82"/>
<connections>
<outlet property="nameLab" destination="2vD-CS-9gG" id="eg6-ko-w3c"/>
<outlet property="progressBgView" destination="apo-8W-rCz" id="Pfx-kj-9cc"/>
<outlet property="progressLab" destination="fe6-0h-cNd" id="dOk-Wg-iHj"/>
<outlet property="seedImv" destination="vl8-v4-bIs" id="C0j-Kg-BNJ"/>
</connections>
<point key="canvasLocation" x="257.24637681159425" y="48.883928571428569"/>
</collectionViewCell>
</objects>
<resources>
<image name="order_seed_1" width="41" height="36"/>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
</resources>
</document>
//
// GYRedPacketView.h
// GYDemo
//
// Created by 明津李 on 2020/10/20.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface GYRedPacketView : UIView
@property (nonatomic, copy) NSString * awardNum;
- (void)show:(UIView *)superView;
@end
NS_ASSUME_NONNULL_END
//
// GYRedPacketView.m
// GYDemo
//
// Created by 明津李 on 2020/10/20.
//
#import "GYRedPacketView.h"
@interface GYRedPacketView ()
@property (nonatomic, weak) IBOutlet UIView * bgView;
@property (nonatomic, weak) IBOutlet UILabel * rankingLab;
@property (nonatomic, weak) IBOutlet UILabel * amtLab;
@end
@implementation GYRedPacketView
- (void)awakeFromNib{
[super awakeFromNib];
self.hidden = YES;
self.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.3];
}
- (void)setAwardNum:(NSString *)awardNum{
_awardNum = awardNum;
NSString * amt = [NSString stringWithFormat:@"%.2f", [awardNum integerValue]*1.0/100];
NSString * amtStr = [NSString stringWithFormat:@"%@元", amt];
NSMutableAttributedString * att = [[NSMutableAttributedString alloc] initWithString:amtStr];
[att addAttributes:@{NSFontAttributeName:[UIFont systemFontOfSize:58]} range:[amtStr rangeOfString:amt]];
[att addAttributes:@{NSFontAttributeName:[UIFont systemFontOfSize:32]} range:[amtStr rangeOfString:@"元"]];
_amtLab.attributedText = att;
}
- (IBAction)confirmBtn:(UIButton *)sender{
[self dismiss];
}
- (void)show:(UIView *)superView{
self.hidden = NO;
CAKeyframeAnimation* animation = [CAKeyframeAnimation animationWithKeyPath:@"transform"];
animation.duration = 0.5;
NSMutableArray *values = [NSMutableArray array];
[values addObject:[NSValue valueWithCATransform3D:CATransform3DMakeScale(0.1, 0.1, 1.0)]];
[values addObject:[NSValue valueWithCATransform3D:CATransform3DMakeScale(1.2, 1.2, 1.0)]];
[values addObject:[NSValue valueWithCATransform3D:CATransform3DMakeScale(0.9, 0.9, 1.0)]];
[values addObject:[NSValue valueWithCATransform3D:CATransform3DMakeScale(1.0, 1.0, 1.0)]];
animation.values = values;
[_bgView.layer addAnimation:animation forKey:nil];
}
- (void)dismiss{
CAKeyframeAnimation* animation = [CAKeyframeAnimation animationWithKeyPath:@"transform"];
animation.duration = 0.33;
NSMutableArray *values = [NSMutableArray array];
[values addObject:[NSValue valueWithCATransform3D:CATransform3DMakeScale(0.9, 0.9, 1.0)]];
[values addObject:[NSValue valueWithCATransform3D:CATransform3DMakeScale(0.5, 0.5, 1.0)]];
[values addObject:[NSValue valueWithCATransform3D:CATransform3DMakeScale(0.1, 0.1, 1.0)]];
[values addObject:[NSValue valueWithCATransform3D:CATransform3DMakeScale(0.0, 0.0, 1.0)]];
animation.values = values;
[_bgView.layer addAnimation:animation forKey:nil];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.31 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
self.hidden = YES;
[self removeFromSuperview];
});
}
@end
This diff is collapsed.
//
// GYSignInCell.h
// GYDemo
//
// Created by 明津李 on 2020/10/21.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface GYSignInCell : UICollectionViewCell
@property (nonatomic, weak) IBOutlet UIImageView * iconImv;
@property (nonatomic, weak) IBOutlet UILabel * numLab;
@property (nonatomic, weak) IBOutlet UILabel * dayLab;
@end
NS_ASSUME_NONNULL_END
//
// GYSignInCell.m
// GYDemo
//
// Created by 明津李 on 2020/10/21.
//
#import "GYSignInCell.h"
@implementation GYSignInCell
- (void)awakeFromNib {
[super awakeFromNib];
// Initialization code
}
@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>
<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"/>
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" id="gTV-IL-0wX" customClass="GYSignInCell">
<rect key="frame" x="0.0" y="0.0" width="139" height="154"/>
<autoresizingMask key="autoresizingMask"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
<rect key="frame" x="0.0" y="0.0" width="139" height="154"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="第N天" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="bp2-Ut-ctA">
<rect key="frame" x="53" y="55" width="33.5" height="14.5"/>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<color key="textColor" red="0.5490196078431373" green="0.33333333333333331" blue="0.10980392156862745" alpha="0.84999999999999998" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="signIn_gold" translatesAutoresizingMaskIntoConstraints="NO" id="PGy-L1-9dB">
<rect key="frame" x="47.5" y="0.0" width="44" height="47"/>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="+0" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="fcs-rt-FLC">
<rect key="frame" x="47.5" y="32.5" width="44" height="14.5"/>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</view>
<viewLayoutGuide key="safeArea" id="SEy-5g-ep8"/>
<constraints>
<constraint firstItem="bp2-Ut-ctA" firstAttribute="top" secondItem="PGy-L1-9dB" secondAttribute="bottom" constant="8" id="56E-67-rsd"/>
<constraint firstItem="PGy-L1-9dB" firstAttribute="centerX" secondItem="gTV-IL-0wX" secondAttribute="centerX" id="Nrw-5d-mZI"/>
<constraint firstItem="bp2-Ut-ctA" firstAttribute="centerX" secondItem="PGy-L1-9dB" secondAttribute="centerX" id="Oge-67-42f"/>
<constraint firstItem="fcs-rt-FLC" firstAttribute="leading" secondItem="PGy-L1-9dB" secondAttribute="leading" id="RYb-oy-8Jt"/>
<constraint firstItem="PGy-L1-9dB" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" id="S8l-R9-FOi"/>
<constraint firstItem="fcs-rt-FLC" firstAttribute="bottom" secondItem="PGy-L1-9dB" secondAttribute="bottom" id="bwh-cO-iak"/>
<constraint firstItem="fcs-rt-FLC" firstAttribute="trailing" secondItem="PGy-L1-9dB" secondAttribute="trailing" id="fdT-k9-R3x"/>
</constraints>
<size key="customSize" width="139" height="154"/>
<connections>
<outlet property="dayLab" destination="bp2-Ut-ctA" id="x3b-75-VMS"/>
<outlet property="iconImv" destination="PGy-L1-9dB" id="9ui-xR-FPO"/>
<outlet property="numLab" destination="fcs-rt-FLC" id="vPV-Co-YV6"/>
</connections>
<point key="canvasLocation" x="164.49275362318841" y="89.732142857142847"/>
</collectionViewCell>
</objects>
<resources>
<image name="signIn_gold" width="44" height="47"/>
</resources>
</document>
//
// GYTaskAlertCollectionHeaderView.h
// GYDemo
//
// Created by 明津李 on 2020/10/21.
//
#import <UIKit/UIKit.h>
#import "GYSignInModel.h"
NS_ASSUME_NONNULL_BEGIN
@interface GYTaskAlertCollectionHeaderView : UICollectionReusableView
@property (nonatomic, assign) GYSignInModel * model;
@end
NS_ASSUME_NONNULL_END
//
// GYTaskAlertCollectionHeaderView.m
// GYDemo
//
// Created by 明津李 on 2020/10/21.
//
#import "GYTaskAlertCollectionHeaderView.h"
#import "GYSignInCell.h"
@interface GYTaskAlertCollectionHeaderView ()<UICollectionViewDelegate,UICollectionViewDataSource,UICollectionViewDelegateFlowLayout>
@property (nonatomic, weak) IBOutlet UICollectionView * collectionView;
@property (nonatomic, strong) NSMutableArray * dataSource;
@end
@implementation GYTaskAlertCollectionHeaderView
- (void)awakeFromNib{
[super awakeFromNib];
// self.hidden = YES;
self.backgroundColor = [UIColor whiteColor];
_collectionView.backgroundColor = [UIColor clearColor];
//设置代理
_collectionView.delegate = self;
_collectionView.dataSource = self;
_collectionView.showsVerticalScrollIndicator = NO;
// _collectionView.collectionViewLayout = flowLayout;
[_collectionView registerNib:[UINib nibWithNibName:@"GYSignInCell" bundle:[NSBundle mainBundle]] forCellWithReuseIdentifier:@"GYSignInCell"];
if (@available(iOS 11.0, *)) {
_collectionView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
}
}
- (void)setModel:(GYSignInModel *)model{
_model = model;
_dataSource = _model.detailModels;
[self.collectionView reloadData];
}
#pragma mark -----UICollecitonViewDelegate
//每个分区边距
- (UIEdgeInsets)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout insetForSectionAtIndex:(NSInteger)section
{
return UIEdgeInsetsMake(0, 0, 0, 0);
}
//item的大小
-(CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath
{
return CGSizeMake((collectionView.frame.size.width-4*(_dataSource.count+1))/_dataSource.count, collectionView.frame.size.height);
}
//区头的大小
-(CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout referenceSizeForHeaderInSection:(NSInteger)section
{
return CGSizeZero;
}
//区尾的大小
-(CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout referenceSizeForFooterInSection:(NSInteger)section
{
return CGSizeZero;
}
//item的行间距
-(CGFloat)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout minimumLineSpacingForSectionAtIndex:(NSInteger)section
{
return CGFLOAT_MIN;
}
//item的间距
-(CGFloat)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout minimumInteritemSpacingForSectionAtIndex:(NSInteger)section
{
return 4;
}
//每个分区的item个数
-(NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section
{
return self.dataSource.count;
}
//每个cell的样式
-(UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
{
GYSignInCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"GYSignInCell" forIndexPath:indexPath];
GYSignInDetailsModel * model = self.dataSource[indexPath.row];
// if (model.awardType == 1) {
cell.iconImv.image = model.status == 1 ? [UIImage imageNamed:@"signIn_gold_done"] : [UIImage imageNamed:@"signIn_gold"];
// }else if (model.awardType == 2) {
// cell.iconImv.image = [UIImage imageNamed:@"signIn_waterDrop"];
// }else{
// cell.iconImv.image = [UIImage imageNamed:@"signIn_box"];
// }
cell.numLab.text = model.status == 1 ? @"已领取" : [NSString stringWithFormat:@"+%ld", (long)model.awardNum];
cell.dayLab.text = [NSString stringWithFormat:@"第%ld天", (long)model.id];
return cell;
}
//cell点击事件
-(void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
[collectionView deselectItemAtIndexPath:indexPath animated:true];
}
@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>
<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"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<collectionReusableView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="GYTaskAlertCollectionHeaderView" id="U6b-Vx-4bR" customClass="GYTaskAlertCollectionHeaderView">
<rect key="frame" x="0.0" y="0.0" width="320" height="76"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="none" translatesAutoresizingMaskIntoConstraints="NO" id="COp-ba-RlO">
<rect key="frame" x="0.0" y="0.0" width="320" height="76"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="10" minimumInteritemSpacing="10" id="FJR-fs-Iqe">
<size key="itemSize" width="128" height="128"/>
<size key="headerReferenceSize" width="0.0" height="0.0"/>
<size key="footerReferenceSize" width="0.0" height="0.0"/>
<inset key="sectionInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
</collectionViewFlowLayout>
<connections>
<outlet property="dataSource" destination="U6b-Vx-4bR" id="52w-TR-emu"/>
<outlet property="delegate" destination="U6b-Vx-4bR" id="gcZ-rQ-SZZ"/>
</connections>
</collectionView>
</subviews>
<viewLayoutGuide key="safeArea" id="9Gg-ye-v9C"/>
<constraints>
<constraint firstAttribute="bottom" secondItem="COp-ba-RlO" secondAttribute="bottom" id="UzR-OO-iey"/>
<constraint firstItem="9Gg-ye-v9C" firstAttribute="trailing" secondItem="COp-ba-RlO" secondAttribute="trailing" id="YAd-8x-Ylw"/>
<constraint firstItem="COp-ba-RlO" firstAttribute="top" secondItem="U6b-Vx-4bR" secondAttribute="top" id="bsy-YW-sJb"/>
<constraint firstItem="COp-ba-RlO" firstAttribute="leading" secondItem="9Gg-ye-v9C" secondAttribute="leading" id="xTe-np-mh9"/>
</constraints>
<connections>
<outlet property="collectionView" destination="COp-ba-RlO" id="cUT-DQ-2Ld"/>
</connections>
<point key="canvasLocation" x="100.00000000000001" y="63.616071428571423"/>
</collectionReusableView>
</objects>
<resources>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
</resources>
</document>
//
// GYTaskAlertView.h
// GYDemo
//
// Created by 明津李 on 2020/10/21.
//
#import <UIKit/UIKit.h>
#import "GYSignInModel.h"
NS_ASSUME_NONNULL_BEGIN
@interface GYTaskAlertView : UIView
@property (nonatomic, strong) NSMutableArray * tasks;
@property (nonatomic, strong) GYSignInModel * model;
- (void)show;
@end
NS_ASSUME_NONNULL_END
//
// GYTaskAlertView.m
// GYDemo
//
// Created by 明津李 on 2020/10/21.
//
#import "GYTaskAlertView.h"
#import "GYTaskCell.h"
#import "GYTaskAlertCollectionHeaderView.h"
#import "GYDayTaskModel.h"
@interface GYTaskAlertView ()<UICollectionViewDelegate,UICollectionViewDataSource,UICollectionViewDelegateFlowLayout>
@property (nonatomic, weak) IBOutlet UIView * bgView;
@property (nonatomic, weak) IBOutlet UIView * tapView;
@property (nonatomic, weak) IBOutlet UICollectionView * collectionView;
@property (nonatomic, strong) NSMutableArray * dataSource;
@end
@implementation GYTaskAlertView
- (void)awakeFromNib{
[super awakeFromNib];
// self.hidden = YES;
self.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.3];
_bgView.backgroundColor = [UIColor clearColor];
_tapView.backgroundColor = [UIColor clearColor];
_collectionView.backgroundColor = [UIColor clearColor];
//设置代理
_collectionView.delegate = self;
_collectionView.dataSource = self;
_collectionView.showsVerticalScrollIndicator = NO;
// _collectionView.collectionViewLayout = flowLayout;
[_collectionView registerNib:[UINib nibWithNibName:@"GYTaskCell" bundle:[NSBundle mainBundle]] forCellWithReuseIdentifier:@"GYTaskCell"];
[_collectionView registerNib:[UINib nibWithNibName:@"GYTaskAlertCollectionHeaderView" bundle:[NSBundle mainBundle]] forSupplementaryViewOfKind:UICollectionElementKindSectionHeader withReuseIdentifier:@"GYTaskAlertCollectionHeaderView"];
if (@available(iOS 11.0, *)) {
_collectionView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
}
UITapGestureRecognizer * tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(dismiss)];
[_tapView addGestureRecognizer:tap];
}
- (void)layoutSubviews{
[super layoutSubviews];
}
- (void)setModel:(GYSignInModel *)model{
_model = model;
}
- (void)setTasks:(NSMutableArray *)tasks{
_tasks = tasks;
self.dataSource = tasks;
[self.collectionView reloadData];
}
- (IBAction)cancelBtn:(UIButton *)sender{
[self dismiss];
}
- (void)show{
self.alpha = 0;
self.bgView.alpha = 0;
// __weak __typeof(self) weakSelf = self;
self.bgView.frame = CGRectMake(0, KScreenHeight, KScreenWidth, self.bgView.frame.size.height);
[UIView animateWithDuration:0.5 animations:^{
self.bgView.frame = CGRectMake(0, KScreenHeight-self.bgView.frame.size.height, KScreenWidth, self.bgView.frame.size.height);
self.alpha = 1;
self.bgView.alpha = 1;
}];
}
- (void)dismiss{
[UIView animateWithDuration:0.5 animations:^{
self.bgView.frame = CGRectMake(0, KScreenHeight, KScreenWidth, self.bgView.frame.size.height);
self.alpha = 0;
self.bgView.alpha = 0;
} completion:^(BOOL finished) {
[self removeFromSuperview];
}];
}
- (void)drawTask:(UIButton *)sender{
GYDayTaskModel * model = self.dataSource[sender.tag-0x64];
[[CGNetworkTools shared] postWithAction:DrawDayTask parameters:@{@"id":[NSString stringWithFormat:@"%ld", model.id]} success:^(id _Nonnull response) {
if ([[response objectForKey:@"status"] integerValue] == 200) {
model.status = 0;
[self.collectionView reloadData];
}
} failure:^(NSError * _Nonnull error) {
}];
}
#pragma mark -----UICollecitonViewDelegate
//每个分区边距
- (UIEdgeInsets)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout insetForSectionAtIndex:(NSInteger)section
{
return UIEdgeInsetsMake(0, 0, 0, 0);
}
//item的大小
-(CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath
{
return CGSizeMake(collectionView.frame.size.width, 83);
}
//区头的大小
-(CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout referenceSizeForHeaderInSection:(NSInteger)section
{
return CGSizeMake(collectionView.frame.size.width, 72);
}
//区尾的大小
-(CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout referenceSizeForFooterInSection:(NSInteger)section
{
return CGSizeZero;
}
//item的行间距
-(CGFloat)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout minimumLineSpacingForSectionAtIndex:(NSInteger)section
{
return CGFLOAT_MIN;
}
//item的间距
-(CGFloat)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout minimumInteritemSpacingForSectionAtIndex:(NSInteger)section
{
return CGFLOAT_MIN;
}
//每个分区的item个数
-(NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section
{
return self.dataSource.count;
}
- (UICollectionReusableView *)collectionView:(UICollectionView *)collectionView viewForSupplementaryElementOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath
{
if (kind == UICollectionElementKindSectionHeader) {
GYTaskAlertCollectionHeaderView *header = [collectionView dequeueReusableSupplementaryViewOfKind:kind withReuseIdentifier:@"GYTaskAlertCollectionHeaderView" forIndexPath:indexPath];
header.backgroundColor = [UIColor clearColor];
header.model = self.model;
return header;
}
return nil;
}
//每个cell的样式
-(UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
{
GYTaskCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"GYTaskCell" forIndexPath:indexPath];
GYDayTaskModel * model = self.dataSource[indexPath.row];
cell.titleLab.text = model.title;
cell.iconImv.image = [UIImage imageNamed:@"task_cell_icon"]; //都是金币
cell.numLab.text = [NSString stringWithFormat:@"+%@g", model.awardNum];
cell.progressLab.text = [NSString stringWithFormat:@"%ld/%ld", model.completedNum, model.targetNum];
cell.progress = model.completedNum*1.0/model.targetNum;
cell.confirmBtn.tag = 0x64+indexPath.row;
if (model.status == 0) {
[cell.confirmBtn setImage:[UIImage imageNamed:@"task_cell_completion"] forState:(UIControlStateNormal)];
[cell.confirmBtn addTarget:self action:@selector(dismiss) forControlEvents:(UIControlEventTouchUpInside)];
}else if (model.status == 1){
[cell.confirmBtn setImage:[UIImage imageNamed:@"task_cell_done"] forState:(UIControlStateNormal)];
}else{
[cell.confirmBtn addTarget:self action:@selector(drawTask:) forControlEvents:(UIControlEventTouchUpInside)];
[cell.confirmBtn setImage:[UIImage imageNamed:@"task_cell_draw"] forState:(UIControlStateNormal)];
}
return cell;
}
//cell点击事件
-(void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
[collectionView deselectItemAtIndexPath:indexPath animated:true];
}
@end
This diff is collapsed.
//
// GYTaskCell.h
// GYDemo
//
// Created by 明津李 on 2020/10/21.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface GYTaskCell : UICollectionViewCell
@property (nonatomic, weak) IBOutlet UILabel * titleLab;
@property (nonatomic, weak) IBOutlet UIView * progressBgView;
@property (nonatomic, weak) IBOutlet UILabel * progressLab;
@property (nonatomic, weak) IBOutlet UIImageView * iconImv;
@property (nonatomic, weak) IBOutlet UILabel * numLab;
@property (nonatomic, weak) IBOutlet UIButton * confirmBtn;
@property (nonatomic, assign) float progress;
@end
NS_ASSUME_NONNULL_END
//
// GYTaskCell.m
// GYDemo
//
// Created by 明津李 on 2020/10/21.
//
#import "GYTaskCell.h"
#import "WTProgressView.h"
@interface GYTaskCell ()
@property (nonatomic, strong) WTProgressView * progressView;
@end
@implementation GYTaskCell
- (void)awakeFromNib {
[super awakeFromNib];
[self layoutIfNeeded];
[self layoutSubviews];
_progressBgView.backgroundColor = [UIColor clearColor];
_progressBgView.clipsToBounds = YES;
_progressView = [[WTProgressView alloc] initWithFrame:self.progressBgView.bounds];
_progressView.backgroundColor = kColorWithRGB(143, 76, 7);
_progressView.layer.cornerRadius = self.progressBgView.bounds.size.height/2;
_progressView.layer.borderWidth = 1;
_progressView.layer.borderColor = kColorWithRGB(143, 76, 7).CGColor;
_progressView.gradientColors = @[kColorWithRGB(250, 197, 80), kColorWithRGB(255, 145, 40)];
[self.progressBgView addSubview:_progressView];
}
- (void)setProgress:(float)progress{
_progress = progress;
_progressView.progress = _progress;
}
@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>
<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"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" id="gTV-IL-0wX" customClass="GYTaskCell">
<rect key="frame" x="0.0" y="0.0" width="496" height="104"/>
<autoresizingMask key="autoresizingMask"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
<rect key="frame" x="0.0" y="0.0" width="496" height="104"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="task_cell_bg" translatesAutoresizingMaskIntoConstraints="NO" id="rv9-bx-WWK">
<rect key="frame" x="0.0" y="4" width="496" height="96"/>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Iiw-2S-hVN">
<rect key="frame" x="13" y="22.5" width="35.5" height="17"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" red="0.54901960780000003" green="0.33333333329999998" blue="0.098039215690000001" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="uQi-w2-lK1">
<rect key="frame" x="431.5" y="22.5" width="35.5" height="17"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" red="0.92549019607843142" green="0.55294117647058827" blue="0.23137254901960785" alpha="0.84705882352941175" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="i84-sQ-4Ls">
<rect key="frame" x="195" y="60.5" width="31" height="14.5"/>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<color key="textColor" red="0.80392156862745101" green="0.6470588235294118" blue="0.37647058823529411" alpha="0.84999999999999998" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Nv0-OG-IC4">
<rect key="frame" x="397" y="52.5" width="86" height="30"/>
<state key="normal" image="task_cell_draw"/>
</button>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ShL-R1-yKv">
<rect key="frame" x="13" y="60.5" width="172" height="14"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstAttribute="width" constant="172" id="NnI-a9-8Ls"/>
<constraint firstAttribute="height" constant="14" id="rME-BC-2bQ"/>
</constraints>
</view>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="task_cell_icon" translatesAutoresizingMaskIntoConstraints="NO" id="zYs-Tu-aWI">
<rect key="frame" x="400.5" y="21.5" width="18" height="19"/>
</imageView>
</subviews>
</view>
<viewLayoutGuide key="safeArea" id="SEy-5g-ep8"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="rv9-bx-WWK" secondAttribute="trailing" id="1gC-FS-Z1O"/>
<constraint firstAttribute="trailing" secondItem="Nv0-OG-IC4" secondAttribute="trailing" constant="13" id="AXC-PW-AS6"/>
<constraint firstAttribute="bottom" secondItem="rv9-bx-WWK" secondAttribute="bottom" constant="4" id="F51-bo-B22"/>
<constraint firstItem="uQi-w2-lK1" firstAttribute="leading" secondItem="zYs-Tu-aWI" secondAttribute="trailing" constant="13" id="I3z-gb-Fg6"/>
<constraint firstItem="rv9-bx-WWK" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" constant="4" id="JXx-il-V50"/>
<constraint firstItem="uQi-w2-lK1" firstAttribute="centerY" secondItem="Iiw-2S-hVN" secondAttribute="centerY" id="M80-T3-CrC"/>
<constraint firstItem="Iiw-2S-hVN" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" constant="13" id="S2V-cf-Whp"/>
<constraint firstItem="ShL-R1-yKv" firstAttribute="leading" secondItem="Iiw-2S-hVN" secondAttribute="leading" id="ST9-rV-sNh"/>
<constraint firstItem="rv9-bx-WWK" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" id="SlW-NU-Lyu"/>
<constraint firstItem="ShL-R1-yKv" firstAttribute="centerY" secondItem="gTV-IL-0wX" secondAttribute="centerY" multiplier="1.3" id="V8k-JS-lkH"/>
<constraint firstItem="i84-sQ-4Ls" firstAttribute="leading" secondItem="ShL-R1-yKv" secondAttribute="trailing" constant="10" id="Zj5-qI-hdF"/>
<constraint firstItem="Iiw-2S-hVN" firstAttribute="centerY" secondItem="gTV-IL-0wX" secondAttribute="centerY" multiplier="0.6" id="Zo2-a7-0Aa"/>
<constraint firstItem="Nv0-OG-IC4" firstAttribute="trailing" secondItem="uQi-w2-lK1" secondAttribute="trailing" constant="16" id="eaU-gK-FXR"/>
<constraint firstItem="zYs-Tu-aWI" firstAttribute="centerY" secondItem="Iiw-2S-hVN" secondAttribute="centerY" id="hza-FV-BUX"/>
<constraint firstItem="i84-sQ-4Ls" firstAttribute="centerY" secondItem="ShL-R1-yKv" secondAttribute="centerY" id="qn1-Un-ZQS"/>
<constraint firstItem="Nv0-OG-IC4" firstAttribute="centerY" secondItem="i84-sQ-4Ls" secondAttribute="centerY" id="wDZ-fW-83m"/>
</constraints>
<size key="customSize" width="496" height="104"/>
<connections>
<outlet property="confirmBtn" destination="Nv0-OG-IC4" id="18c-gK-2QX"/>
<outlet property="iconImv" destination="zYs-Tu-aWI" id="KAd-DF-Mhl"/>
<outlet property="numLab" destination="uQi-w2-lK1" id="c7B-Nt-eH7"/>
<outlet property="progressBgView" destination="ShL-R1-yKv" id="5xN-j8-AXt"/>
<outlet property="progressLab" destination="i84-sQ-4Ls" id="KbK-r7-YW8"/>
<outlet property="titleLab" destination="Iiw-2S-hVN" id="ODd-Vr-yxY"/>
</connections>
<point key="canvasLocation" x="178.2608695652174" y="72.991071428571431"/>
</collectionViewCell>
</objects>
<resources>
<image name="task_cell_bg" width="332" height="75"/>
<image name="task_cell_draw" width="86" height="30"/>
<image name="task_cell_icon" width="18" height="19"/>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
</resources>
</document>
//
// AppDelegate.h
// GYDemo
//
// Created by 明津李 on 2020/10/20.
//
#import <UIKit/UIKit.h>
#include <UnityFramework/UnityFramework.h>
#include <UnityFramework/NativeCallProxy.h>
@interface AppDelegate: UIResponder<UIApplicationDelegate, UnityFrameworkListener, NativeCallsProtocol>
@property (strong, nonatomic) UIWindow *window;
@property (nonatomic, copy) NSString *payPageName;
@property UnityFramework* ufw;
- (void)initUnity;
- (void)ShowMainView;
- (void)sendMsgToUnity;
- (void)ios_getOrderData;
@end
This diff is collapsed.
{
"colors" : [
{
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "加速计@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "加速计@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "弹窗bg@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "弹窗bg@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "关闭按钮。@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "关闭按钮。@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "免费开宝箱按钮。@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "免费开宝箱按钮。@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "金币@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "金币@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "标题。@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "标题。@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "标题。@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "标题。@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "标题。@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "标题。@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "白菜种子@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "白菜种子@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "西红柿种子@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "西红柿种子@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "南瓜种子@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "南瓜种子@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "萝卜种子@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "萝卜种子@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "玉米种子@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "玉米种子@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "茄子种子@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "茄子种子@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "西瓜种子@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "西瓜种子@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "葡萄种子@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "葡萄种子@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "草莓种子@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "草莓种子@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "弹窗bg@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "弹窗bg@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "标题。@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "标题。@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "白菜果实@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "白菜果实@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "西红柿果实@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "西红柿果实@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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