首次提交
This commit is contained in:
26
SweetParty/主类/狸猫新增/签到/LMSignInAlertCollectionViewCell.h
Normal file
26
SweetParty/主类/狸猫新增/签到/LMSignInAlertCollectionViewCell.h
Normal file
@@ -0,0 +1,26 @@
|
||||
//
|
||||
// LMSignInAlertCollectionViewCell.h
|
||||
// SweetParty
|
||||
//
|
||||
// Created by Xmac on 2024/8/30.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "LMSingListModel.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
static NSString *LMSignInAlertCollectionViewCellID = @"LMSignInAlertCollectionViewCellID";
|
||||
@interface LMSignInAlertCollectionViewCell : UICollectionViewCell
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UILabel *coinLabel;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *dayLabel;
|
||||
@property (weak, nonatomic) IBOutlet UIView *signsCover;
|
||||
@property (weak, nonatomic) IBOutlet UIView *baseCover;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *bgImg;
|
||||
|
||||
@property (nonatomic, strong) LMSingListModel *model;
|
||||
@property (nonatomic, assign) NSInteger index;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
48
SweetParty/主类/狸猫新增/签到/LMSignInAlertCollectionViewCell.m
Normal file
48
SweetParty/主类/狸猫新增/签到/LMSignInAlertCollectionViewCell.m
Normal file
@@ -0,0 +1,48 @@
|
||||
//
|
||||
// LMSignInAlertCollectionViewCell.m
|
||||
// SweetParty
|
||||
//
|
||||
// Created by Xmac on 2024/8/30.
|
||||
//
|
||||
|
||||
#import "LMSignInAlertCollectionViewCell.h"
|
||||
|
||||
@implementation LMSignInAlertCollectionViewCell
|
||||
|
||||
- (void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
// Initialization code
|
||||
}
|
||||
|
||||
- (void)setModel:(LMSingListModel *)model
|
||||
{
|
||||
_model = model;
|
||||
self.coinLabel.text = [NSString stringWithFormat:@"%@金币",model.award];
|
||||
if (model.is_sign == 2){
|
||||
self.coinLabel.textColor = HEXCOLOR(0x333333);
|
||||
}else{
|
||||
self.coinLabel.textColor = HEXCOLOR(0xFFFFFF);
|
||||
}
|
||||
}
|
||||
|
||||
- (void)setIndex:(NSInteger)index {
|
||||
_index = index;
|
||||
|
||||
self.dayLabel.text = [NSString stringWithFormat:@"%ld",index+1];
|
||||
|
||||
if (index < 6) {
|
||||
if (_model.is_sign == 2){
|
||||
self.bgImg.image = ImageNamed(@"signin_bg_1");
|
||||
}else{
|
||||
self.bgImg.image = ImageNamed(@"signin_bg_2");
|
||||
}
|
||||
}else {
|
||||
if (_model.is_sign == 2){
|
||||
self.bgImg.image = ImageNamed(@"signin_bg_3");
|
||||
}else{
|
||||
self.bgImg.image = ImageNamed(@"signin_bg_4");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
92
SweetParty/主类/狸猫新增/签到/LMSignInAlertCollectionViewCell.xib
Normal file
92
SweetParty/主类/狸猫新增/签到/LMSignInAlertCollectionViewCell.xib
Normal file
@@ -0,0 +1,92 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<device id="retina6_12" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21679"/>
|
||||
<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="LMSignInAlertCollectionViewCell">
|
||||
<rect key="frame" x="0.0" y="0.0" width="70" height="55"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
|
||||
<rect key="frame" x="0.0" y="0.0" width="70" height="55"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="MHf-tU-VPR">
|
||||
<rect key="frame" x="0.0" y="0.0" width="70" height="55"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="signin_bg_1" translatesAutoresizingMaskIntoConstraints="NO" id="clc-CX-WMp">
|
||||
<rect key="frame" x="0.0" y="0.0" width="70" height="55"/>
|
||||
</imageView>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="day_bg" translatesAutoresizingMaskIntoConstraints="NO" id="voY-QH-Mx5">
|
||||
<rect key="frame" x="0.0" y="0.0" width="20" height="20"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="20" id="156-Wa-Bts"/>
|
||||
<constraint firstAttribute="width" constant="20" id="jKq-YL-MaQ"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="1" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qcN-Un-uaP">
|
||||
<rect key="frame" x="7.3333333333333339" y="4" width="5.3333333333333339" height="12"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="10"/>
|
||||
<color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="lm_home_sign_jinbi" translatesAutoresizingMaskIntoConstraints="NO" id="FOh-uQ-m4l">
|
||||
<rect key="frame" x="23" y="6" width="24" height="24"/>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="10金币" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="fWY-gW-CHP">
|
||||
<rect key="frame" x="19" y="37" width="32" height="12"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="10"/>
|
||||
<color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="bottom" secondItem="fWY-gW-CHP" secondAttribute="bottom" constant="6" id="5oz-eq-kjs"/>
|
||||
<constraint firstItem="FOh-uQ-m4l" firstAttribute="centerX" secondItem="MHf-tU-VPR" secondAttribute="centerX" id="7h2-ei-QdV"/>
|
||||
<constraint firstItem="voY-QH-Mx5" firstAttribute="leading" secondItem="MHf-tU-VPR" secondAttribute="leading" id="Dp4-XA-kKe"/>
|
||||
<constraint firstItem="clc-CX-WMp" firstAttribute="leading" secondItem="MHf-tU-VPR" secondAttribute="leading" id="Gh1-Fo-pWI"/>
|
||||
<constraint firstAttribute="bottom" secondItem="clc-CX-WMp" secondAttribute="bottom" id="RX3-gc-77z"/>
|
||||
<constraint firstItem="clc-CX-WMp" firstAttribute="top" secondItem="MHf-tU-VPR" secondAttribute="top" id="Ulc-bO-kmg"/>
|
||||
<constraint firstItem="fWY-gW-CHP" firstAttribute="centerX" secondItem="MHf-tU-VPR" secondAttribute="centerX" id="VQK-G8-OYC"/>
|
||||
<constraint firstAttribute="trailing" secondItem="clc-CX-WMp" secondAttribute="trailing" id="WUd-5p-7YV"/>
|
||||
<constraint firstItem="FOh-uQ-m4l" firstAttribute="top" secondItem="MHf-tU-VPR" secondAttribute="top" constant="6" id="acJ-YS-4kI"/>
|
||||
<constraint firstItem="qcN-Un-uaP" firstAttribute="centerX" secondItem="voY-QH-Mx5" secondAttribute="centerX" id="haW-MU-AWW"/>
|
||||
<constraint firstItem="voY-QH-Mx5" firstAttribute="top" secondItem="MHf-tU-VPR" secondAttribute="top" id="iVM-6o-CrK"/>
|
||||
<constraint firstItem="qcN-Un-uaP" firstAttribute="centerY" secondItem="voY-QH-Mx5" secondAttribute="centerY" id="sdH-fC-IbD"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="borderColor">
|
||||
<color key="value" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
</subviews>
|
||||
</view>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="MHf-tU-VPR" secondAttribute="trailing" id="Y68-oq-2fh"/>
|
||||
<constraint firstItem="MHf-tU-VPR" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" id="bU8-Ro-Laf"/>
|
||||
<constraint firstItem="MHf-tU-VPR" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" id="lXV-L4-nIx"/>
|
||||
<constraint firstAttribute="bottom" secondItem="MHf-tU-VPR" secondAttribute="bottom" id="qbL-ex-f27"/>
|
||||
</constraints>
|
||||
<size key="customSize" width="80" height="85"/>
|
||||
<connections>
|
||||
<outlet property="baseCover" destination="MHf-tU-VPR" id="VfU-rf-ipK"/>
|
||||
<outlet property="bgImg" destination="clc-CX-WMp" id="iJr-5D-AIr"/>
|
||||
<outlet property="coinLabel" destination="fWY-gW-CHP" id="neo-DL-opz"/>
|
||||
<outlet property="dayLabel" destination="qcN-Un-uaP" id="bPK-cU-sFu"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="152.67175572519082" y="1.0563380281690142"/>
|
||||
</collectionViewCell>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="day_bg" width="20" height="20"/>
|
||||
<image name="lm_home_sign_jinbi" width="24" height="24"/>
|
||||
<image name="signin_bg_1" width="70" height="55"/>
|
||||
</resources>
|
||||
</document>
|
||||
20
SweetParty/主类/狸猫新增/签到/LMSignInAlertView.h
Normal file
20
SweetParty/主类/狸猫新增/签到/LMSignInAlertView.h
Normal file
@@ -0,0 +1,20 @@
|
||||
//
|
||||
// LMSignInAlertView.h
|
||||
// SweetParty
|
||||
//
|
||||
// Created by Xmac on 2024/8/30.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface LMSignInAlertView : UIView
|
||||
|
||||
@property (nonatomic, assign) NSInteger isHome;
|
||||
@property (nonatomic, strong) id response;
|
||||
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
136
SweetParty/主类/狸猫新增/签到/LMSignInAlertView.m
Normal file
136
SweetParty/主类/狸猫新增/签到/LMSignInAlertView.m
Normal file
@@ -0,0 +1,136 @@
|
||||
//
|
||||
// LMSignInAlertView.m
|
||||
// SweetParty
|
||||
//
|
||||
// Created by Xmac on 2024/8/30.
|
||||
//
|
||||
|
||||
#import "LMSignInAlertView.h"
|
||||
#import "LMSignInAlertCollectionViewCell.h"
|
||||
#import "LMSignInSuccessAlertView.h"
|
||||
|
||||
@interface LMSignInAlertView ()<UICollectionViewDelegate,UICollectionViewDataSource>
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UIButton *confirmButton;
|
||||
@property (weak, nonatomic) IBOutlet UICollectionView *signItemView;
|
||||
@property (nonatomic, assign) NSInteger today_sign; //1-已签到 2-未签到
|
||||
@property (nonatomic, assign) NSInteger sign_num; //已签到天数
|
||||
@property (nonatomic, strong) NSMutableArray *dataArr;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *signnumLabel;
|
||||
|
||||
@end
|
||||
|
||||
@implementation LMSignInAlertView
|
||||
|
||||
- (void)awakeFromNib
|
||||
{
|
||||
[super awakeFromNib];
|
||||
[self setupUI];
|
||||
}
|
||||
|
||||
- (void)setIsHome:(NSInteger)isHome
|
||||
{
|
||||
_isHome = isHome;
|
||||
if (self.isHome){
|
||||
[self setupHomeResp];
|
||||
}else{
|
||||
[self requestSigninInfo];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)setupHomeResp
|
||||
{
|
||||
NSDictionary *data = [self.response safeDictionaryForKey:@"data"];
|
||||
self.sign_num = [data safeIntForKey:@"sign_num"];
|
||||
self.today_sign = [data safeIntForKey:@"today_sign"];
|
||||
self.signnumLabel.text = [NSString stringWithFormat:@"已累计签到%ld天",self.sign_num];
|
||||
self.dataArr = [LMSingListModel mj_objectArrayWithKeyValuesArray:[data safeArrayForKey:@"sign_log"]];
|
||||
[self.signItemView reloadData];
|
||||
if (self.today_sign == 1){
|
||||
self.confirmButton.selected = YES;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)setupUI
|
||||
{
|
||||
UICollectionViewFlowLayout *flow = [[UICollectionViewFlowLayout alloc] init];
|
||||
flow.sectionInset = UIEdgeInsetsMake(0, 0, 0, 0);
|
||||
|
||||
self.signItemView.collectionViewLayout = flow;
|
||||
self.signItemView.delegate = self;
|
||||
self.signItemView.dataSource = self;
|
||||
[self.signItemView registerNib:[UINib nibWithNibName:@"LMSignInAlertCollectionViewCell" bundle:nil] forCellWithReuseIdentifier:LMSignInAlertCollectionViewCellID];
|
||||
}
|
||||
|
||||
|
||||
- (IBAction)confirmButtonClick:(UIButton *)sender {
|
||||
if (self.today_sign == 1){
|
||||
return;
|
||||
}
|
||||
[BJHttpTool BJ_User_day_signParameters:@{} success:^(id response) {
|
||||
NSDictionary *data = [response safeDictionaryForKey:@"data"];
|
||||
NSString *award = [data safeStringForKey:@"award"];
|
||||
|
||||
[self requestSigninInfo];
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||
LMSignInSuccessAlertView *suc = LoadNib(@"LMSignInSuccessAlertView");
|
||||
suc.frame = CGRectMake(0, 0, APPW, APPH);
|
||||
suc.sucTipLabel.text = [NSString stringWithFormat:@"签到成功 金币+%@",award];
|
||||
[MainWindow() addSubview:suc];
|
||||
[self removeFromSuperview];
|
||||
});
|
||||
} failure:^(NSError *error) {
|
||||
|
||||
}];
|
||||
}
|
||||
|
||||
- (IBAction)closeButtonClick:(UIButton *)sender {
|
||||
[self removeFromSuperview];
|
||||
}
|
||||
|
||||
|
||||
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section
|
||||
{
|
||||
return self.dataArr.count;
|
||||
}
|
||||
|
||||
|
||||
- (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
LMSignInAlertCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:LMSignInAlertCollectionViewCellID forIndexPath:indexPath];
|
||||
if (indexPath.row < self.dataArr.count){
|
||||
LMSingListModel *model = self.dataArr[indexPath.row];
|
||||
cell.model = model;
|
||||
cell.index = indexPath.row;
|
||||
}
|
||||
return cell;
|
||||
}
|
||||
|
||||
- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
if (indexPath.row < 6){
|
||||
return CGSizeMake((APPW-60-12*3)/4, 55);
|
||||
}else{
|
||||
return CGSizeMake((APPW-60-12*3)/2+15, 55);
|
||||
}
|
||||
}
|
||||
|
||||
- (void)requestSigninInfo
|
||||
{
|
||||
[BJHttpTool BJ_User_day_sign_logParameters:@{} success:^(id response) {
|
||||
NSDictionary *data = [response safeDictionaryForKey:@"data"];
|
||||
self.sign_num = [data safeIntForKey:@"sign_num"];
|
||||
self.today_sign = [data safeIntForKey:@"today_sign"];
|
||||
self.signnumLabel.text = [NSString stringWithFormat:@"已累计签到%ld天",self.sign_num];
|
||||
self.dataArr = [LMSingListModel mj_objectArrayWithKeyValuesArray:[data safeArrayForKey:@"sign_log"]];
|
||||
[self.signItemView reloadData];
|
||||
if (self.today_sign == 1){
|
||||
self.confirmButton.selected = YES;
|
||||
}
|
||||
} failure:^(NSError *error) {
|
||||
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
125
SweetParty/主类/狸猫新增/签到/LMSignInAlertView.xib
Normal file
125
SweetParty/主类/狸猫新增/签到/LMSignInAlertView.xib
Normal file
@@ -0,0 +1,125 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="22505" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<device id="retina6_12" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22504"/>
|
||||
<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="LMSignInAlertView">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="XQ0-CP-bYi">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
<connections>
|
||||
<action selector="closeButtonClick:" destination="iN0-l3-epB" eventType="touchUpInside" id="g2K-ys-qT5"/>
|
||||
</connections>
|
||||
</button>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="signin_top" translatesAutoresizingMaskIntoConstraints="NO" id="Te7-gC-DKg">
|
||||
<rect key="frame" x="15" y="149" width="345" height="97"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" secondItem="Te7-gC-DKg" secondAttribute="height" multiplier="345:97" id="DDa-7j-6dv"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="m6y-UL-4rb">
|
||||
<rect key="frame" x="15" y="246" width="345" height="320"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="lm_home_sign_bg" translatesAutoresizingMaskIntoConstraints="NO" id="wd4-A8-kgM">
|
||||
<rect key="frame" x="0.0" y="0.0" width="345" height="320"/>
|
||||
</imageView>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="signin_title" translatesAutoresizingMaskIntoConstraints="NO" id="8bc-kq-WzE">
|
||||
<rect key="frame" x="109.66666666666666" y="5.0000000000000018" width="125.66666666666666" height="24.666666666666671"/>
|
||||
</imageView>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="zmr-S6-a73">
|
||||
<rect key="frame" x="30" y="246" width="285" height="44"/>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
<state key="normal" image="lm_home_sign_qiandao"/>
|
||||
<state key="selected" image="lm_home_sign_yiqiandao"/>
|
||||
<connections>
|
||||
<action selector="confirmButtonClick:" destination="iN0-l3-epB" eventType="touchUpInside" id="zUf-Mm-eMG"/>
|
||||
</connections>
|
||||
</button>
|
||||
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="none" translatesAutoresizingMaskIntoConstraints="NO" id="kFh-zK-3EC">
|
||||
<rect key="frame" x="15" y="90" width="315" height="140"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="140" id="BHi-kd-fno"/>
|
||||
</constraints>
|
||||
<collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="10" minimumInteritemSpacing="10" id="pC4-Es-LVt">
|
||||
<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>
|
||||
</collectionView>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="已累计签到0天" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="0hv-5r-1s7">
|
||||
<rect key="frame" x="110" y="52" width="125" height="24"/>
|
||||
<color key="backgroundColor" red="0.0" green="0.71372549019607845" blue="0.50980392156862742" alpha="0.10000000000000001" colorSpace="calibratedRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="24" id="KAU-oK-Hwn"/>
|
||||
<constraint firstAttribute="width" constant="125" id="b15-Pb-c5v"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/>
|
||||
<color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="12"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" secondItem="m6y-UL-4rb" secondAttribute="height" multiplier="345:320" id="6d9-T2-8sK"/>
|
||||
<constraint firstItem="zmr-S6-a73" firstAttribute="centerX" secondItem="m6y-UL-4rb" secondAttribute="centerX" id="FHV-mT-XDE"/>
|
||||
<constraint firstItem="wd4-A8-kgM" firstAttribute="top" secondItem="m6y-UL-4rb" secondAttribute="top" id="GV0-X8-aI5"/>
|
||||
<constraint firstItem="kFh-zK-3EC" firstAttribute="top" secondItem="m6y-UL-4rb" secondAttribute="top" constant="90" id="TBE-4j-axr"/>
|
||||
<constraint firstItem="0hv-5r-1s7" firstAttribute="top" secondItem="m6y-UL-4rb" secondAttribute="top" constant="52" id="XeV-r4-eqM"/>
|
||||
<constraint firstItem="8bc-kq-WzE" firstAttribute="top" secondItem="m6y-UL-4rb" secondAttribute="top" constant="5" id="bAB-rW-ZdT"/>
|
||||
<constraint firstItem="kFh-zK-3EC" firstAttribute="leading" secondItem="m6y-UL-4rb" secondAttribute="leading" constant="15" id="guU-mq-yXi"/>
|
||||
<constraint firstItem="0hv-5r-1s7" firstAttribute="centerX" secondItem="m6y-UL-4rb" secondAttribute="centerX" id="tSl-eg-C9Y"/>
|
||||
<constraint firstAttribute="trailing" secondItem="kFh-zK-3EC" secondAttribute="trailing" constant="15" id="uJ0-fD-omB"/>
|
||||
<constraint firstAttribute="trailing" secondItem="wd4-A8-kgM" secondAttribute="trailing" id="ube-c3-7Jw"/>
|
||||
<constraint firstAttribute="bottom" secondItem="zmr-S6-a73" secondAttribute="bottom" constant="30" id="wfu-Zc-LNG"/>
|
||||
<constraint firstItem="wd4-A8-kgM" firstAttribute="leading" secondItem="m6y-UL-4rb" secondAttribute="leading" id="x5L-n9-6Ra"/>
|
||||
<constraint firstItem="8bc-kq-WzE" firstAttribute="centerX" secondItem="m6y-UL-4rb" secondAttribute="centerX" id="yTH-uh-ZtF"/>
|
||||
<constraint firstAttribute="bottom" secondItem="wd4-A8-kgM" secondAttribute="bottom" id="zVc-i0-2g8"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.29999999999999999" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstItem="XQ0-CP-bYi" firstAttribute="trailing" secondItem="iN0-l3-epB" secondAttribute="trailing" id="1O6-wR-iER"/>
|
||||
<constraint firstItem="m6y-UL-4rb" firstAttribute="trailing" secondItem="Te7-gC-DKg" secondAttribute="trailing" id="4Cd-MH-piK"/>
|
||||
<constraint firstItem="m6y-UL-4rb" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="15" id="6RK-kB-cwm"/>
|
||||
<constraint firstItem="m6y-UL-4rb" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="centerY" id="ClO-Q9-jUY"/>
|
||||
<constraint firstItem="XQ0-CP-bYi" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="Nt7-4L-NgA"/>
|
||||
<constraint firstItem="m6y-UL-4rb" firstAttribute="top" secondItem="Te7-gC-DKg" secondAttribute="bottom" id="fUm-EX-SCN"/>
|
||||
<constraint firstAttribute="trailing" secondItem="m6y-UL-4rb" secondAttribute="trailing" constant="15" id="fdM-YI-daF"/>
|
||||
<constraint firstItem="m6y-UL-4rb" firstAttribute="leading" secondItem="Te7-gC-DKg" secondAttribute="leading" id="ki5-yT-G3S"/>
|
||||
<constraint firstItem="XQ0-CP-bYi" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="q8S-xB-HEX"/>
|
||||
<constraint firstAttribute="bottom" secondItem="XQ0-CP-bYi" secondAttribute="bottom" id="qlf-Lb-sL4"/>
|
||||
</constraints>
|
||||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
||||
<connections>
|
||||
<outlet property="confirmButton" destination="zmr-S6-a73" id="aE7-Ke-gkR"/>
|
||||
<outlet property="signItemView" destination="kFh-zK-3EC" id="PGe-xH-YI7"/>
|
||||
<outlet property="signnumLabel" destination="0hv-5r-1s7" id="7a6-Pt-UaP"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="144" y="73"/>
|
||||
</view>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="lm_home_sign_bg" width="345" height="320"/>
|
||||
<image name="lm_home_sign_qiandao" width="285" height="44"/>
|
||||
<image name="lm_home_sign_yiqiandao" width="285" height="44"/>
|
||||
<image name="signin_title" width="125.5" height="24.5"/>
|
||||
<image name="signin_top" width="345" height="97"/>
|
||||
</resources>
|
||||
</document>
|
||||
18
SweetParty/主类/狸猫新增/签到/LMSignInSuccessAlertView.h
Normal file
18
SweetParty/主类/狸猫新增/签到/LMSignInSuccessAlertView.h
Normal file
@@ -0,0 +1,18 @@
|
||||
//
|
||||
// LMSignInSuccessAlertView.h
|
||||
// SweetParty
|
||||
//
|
||||
// Created by Xmac on 2024/8/30.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface LMSignInSuccessAlertView : UIView
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UILabel *sucTipLabel;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
16
SweetParty/主类/狸猫新增/签到/LMSignInSuccessAlertView.m
Normal file
16
SweetParty/主类/狸猫新增/签到/LMSignInSuccessAlertView.m
Normal file
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// LMSignInSuccessAlertView.m
|
||||
// SweetParty
|
||||
//
|
||||
// Created by Xmac on 2024/8/30.
|
||||
//
|
||||
|
||||
#import "LMSignInSuccessAlertView.h"
|
||||
|
||||
@implementation LMSignInSuccessAlertView
|
||||
|
||||
- (IBAction)closeButtonClick:(UIButton *)sender {
|
||||
[self removeFromSuperview];
|
||||
}
|
||||
|
||||
@end
|
||||
79
SweetParty/主类/狸猫新增/签到/LMSignInSuccessAlertView.xib
Normal file
79
SweetParty/主类/狸猫新增/签到/LMSignInSuccessAlertView.xib
Normal file
@@ -0,0 +1,79 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="22505" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<device id="retina6_12" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22504"/>
|
||||
<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="LMSignInSuccessAlertView">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Lfs-tC-OYq">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
<connections>
|
||||
<action selector="closeButtonClick:" destination="iN0-l3-epB" eventType="touchUpInside" id="qIK-tu-cmp"/>
|
||||
</connections>
|
||||
</button>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="dDH-qW-dBi">
|
||||
<rect key="frame" x="15" y="246" width="345" height="320"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="lm_home_sign_suc_bg" translatesAutoresizingMaskIntoConstraints="NO" id="s1q-NR-wxy">
|
||||
<rect key="frame" x="0.0" y="0.0" width="345" height="320"/>
|
||||
</imageView>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="sNc-uP-rMQ">
|
||||
<rect key="frame" x="30" y="246" width="285" height="44"/>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
<state key="normal" image="lm_home_sign_suc_shouxia"/>
|
||||
<connections>
|
||||
<action selector="closeButtonClick:" destination="iN0-l3-epB" eventType="touchUpInside" id="sCm-fP-ost"/>
|
||||
</connections>
|
||||
</button>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="签到成功 金币+10" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Jsr-tD-4VT">
|
||||
<rect key="frame" x="107" y="195" width="131" height="19.333333333333343"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="16"/>
|
||||
<color key="textColor" red="0.0" green="0.71372549019607845" blue="0.50980392156862742" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="s1q-NR-wxy" firstAttribute="top" secondItem="dDH-qW-dBi" secondAttribute="top" id="OMz-gH-q0R"/>
|
||||
<constraint firstAttribute="trailing" secondItem="s1q-NR-wxy" secondAttribute="trailing" id="Ra5-mT-nvA"/>
|
||||
<constraint firstAttribute="bottom" secondItem="s1q-NR-wxy" secondAttribute="bottom" id="TkV-RT-yKi"/>
|
||||
<constraint firstAttribute="width" secondItem="dDH-qW-dBi" secondAttribute="height" multiplier="345:320" id="Zep-be-WVB"/>
|
||||
<constraint firstAttribute="bottom" secondItem="sNc-uP-rMQ" secondAttribute="bottom" constant="30" id="foM-6D-oNn"/>
|
||||
<constraint firstItem="s1q-NR-wxy" firstAttribute="leading" secondItem="dDH-qW-dBi" secondAttribute="leading" id="foy-Kj-epK"/>
|
||||
<constraint firstItem="sNc-uP-rMQ" firstAttribute="centerX" secondItem="dDH-qW-dBi" secondAttribute="centerX" id="i8S-TK-gyH"/>
|
||||
<constraint firstItem="Jsr-tD-4VT" firstAttribute="top" secondItem="dDH-qW-dBi" secondAttribute="top" constant="195" id="lJp-TZ-Jsq"/>
|
||||
<constraint firstItem="Jsr-tD-4VT" firstAttribute="centerX" secondItem="dDH-qW-dBi" secondAttribute="centerX" id="rCU-n6-bzK"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.29999999999999999" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstItem="Lfs-tC-OYq" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="8cg-VF-oS4"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Lfs-tC-OYq" secondAttribute="trailing" id="D4X-wd-eyN"/>
|
||||
<constraint firstAttribute="bottom" secondItem="Lfs-tC-OYq" secondAttribute="bottom" id="IK1-Kj-D79"/>
|
||||
<constraint firstItem="dDH-qW-dBi" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="15" id="ZD7-co-u7Z"/>
|
||||
<constraint firstItem="Lfs-tC-OYq" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="dcG-I8-Urw"/>
|
||||
<constraint firstAttribute="trailing" secondItem="dDH-qW-dBi" secondAttribute="trailing" constant="15" id="gTf-J0-hue"/>
|
||||
<constraint firstItem="dDH-qW-dBi" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="centerY" id="q7e-bo-vz4"/>
|
||||
</constraints>
|
||||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
||||
<connections>
|
||||
<outlet property="sucTipLabel" destination="Jsr-tD-4VT" id="uqS-JI-CSW"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="130.53435114503816" y="-11.267605633802818"/>
|
||||
</view>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="lm_home_sign_suc_bg" width="345" height="320"/>
|
||||
<image name="lm_home_sign_suc_shouxia" width="285" height="44"/>
|
||||
</resources>
|
||||
</document>
|
||||
19
SweetParty/主类/狸猫新增/签到/LMSingListModel.h
Normal file
19
SweetParty/主类/狸猫新增/签到/LMSingListModel.h
Normal file
@@ -0,0 +1,19 @@
|
||||
//
|
||||
// LMSingListModel.h
|
||||
// SweetParty
|
||||
//
|
||||
// Created by Xmac on 2024/8/31.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface LMSingListModel : NSObject
|
||||
|
||||
@property (nonatomic, assign) NSInteger is_sign;
|
||||
@property (nonatomic, strong) NSString *award;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
12
SweetParty/主类/狸猫新增/签到/LMSingListModel.m
Normal file
12
SweetParty/主类/狸猫新增/签到/LMSingListModel.m
Normal file
@@ -0,0 +1,12 @@
|
||||
//
|
||||
// LMSingListModel.m
|
||||
// SweetParty
|
||||
//
|
||||
// Created by Xmac on 2024/8/31.
|
||||
//
|
||||
|
||||
#import "LMSingListModel.h"
|
||||
|
||||
@implementation LMSingListModel
|
||||
|
||||
@end
|
||||
Reference in New Issue
Block a user