寻爱优化

This commit is contained in:
liyuhua
2023-11-27 14:53:52 +08:00
parent a19adac48e
commit 398b4e5e81
11 changed files with 56 additions and 15 deletions

View File

@@ -31,7 +31,7 @@
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Release"
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 KiB

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 9.8 KiB

View File

@@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "room_candy_two_hundredth_tap_bg@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "room_candy_two_hundredth_tap_bg@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

View File

@@ -69,6 +69,8 @@ UIKIT_EXTERN NSString * const kRoomReceivedCandyNotificationKey;
@property(nonatomic,strong) UIButton *tenthLoveBtn;
///
@property(nonatomic,strong) UIButton *hundredthLoveBtn;
///
@property(nonatomic,strong) UIButton *twoHundredhLoveBtn;
///
@property (nonatomic,strong) UIView * animationView;
@@ -324,6 +326,7 @@ UIKIT_EXTERN NSString * const kRoomReceivedCandyNotificationKey;
[self.bgImageView addSubview:self.fristLoveBtn];
[self.bgImageView addSubview:self.tenthLoveBtn];
[self.bgImageView addSubview:self.hundredthLoveBtn];
[self.bgImageView addSubview:self.twoHundredhLoveBtn];
[self.bgImageView addSubview:self.candyTreeLightView];
[self.bgImageView addSubview:self.candyTreeOpenView];
[self.bgImageView addSubview:self.candyTreeTransView];
@@ -388,25 +391,30 @@ UIKIT_EXTERN NSString * const kRoomReceivedCandyNotificationKey;
}];
[self.fristLoveBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.bottom.equalTo(self.candyTreeView.mas_bottom).mas_offset(-kGetScaleWidth(7));
make.leading.mas_equalTo(kGetScaleWidth(15));
make.width.mas_equalTo(kGetScaleWidth(94));
make.height.mas_equalTo(kGetScaleWidth(55));
make.bottom.equalTo(self.candyTreeView.mas_bottom).mas_offset(-kGetScaleWidth(8));
make.leading.mas_equalTo(kGetScaleWidth(14));
make.width.mas_equalTo(kGetScaleWidth(72));
make.height.mas_equalTo(kGetScaleWidth(53));
}];
[self.tenthLoveBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.bottom.equalTo(self.candyTreeView.mas_bottom).mas_offset(-kGetScaleWidth(7));
make.leading.mas_equalTo(kGetScaleWidth(109));
make.width.mas_equalTo(kGetScaleWidth(94));
make.height.mas_equalTo(kGetScaleWidth(55));
make.bottom.equalTo(self.candyTreeView.mas_bottom).mas_offset(-kGetScaleWidth(8));
make.leading.mas_equalTo(kGetScaleWidth(84));
make.width.mas_equalTo(kGetScaleWidth(72));
make.height.mas_equalTo(kGetScaleWidth(53));
}];
[self.hundredthLoveBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.bottom.equalTo(self.candyTreeView.mas_bottom).mas_offset(-kGetScaleWidth(7));
make.leading.mas_equalTo(kGetScaleWidth(201));
make.width.mas_equalTo(kGetScaleWidth(94));
make.height.mas_equalTo(kGetScaleWidth(55));
make.bottom.equalTo(self.candyTreeView.mas_bottom).mas_offset(-kGetScaleWidth(8));
make.leading.mas_equalTo(kGetScaleWidth(154));
make.width.mas_equalTo(kGetScaleWidth(72));
make.height.mas_equalTo(kGetScaleWidth(53));
}];
[self.twoHundredhLoveBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.bottom.equalTo(self.candyTreeView.mas_bottom).mas_offset(-kGetScaleWidth(8));
make.leading.mas_equalTo(kGetScaleWidth(224));
make.width.mas_equalTo(kGetScaleWidth(72));
make.height.mas_equalTo(kGetScaleWidth(53));
}];
CGFloat kscale = (CGFloat)350 / (CGFloat)755;
[self.candyTreeTransView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(self.candyTreeView);
@@ -531,8 +539,10 @@ UIKIT_EXTERN NSString * const kRoomReceivedCandyNotificationKey;
num = 1;
}else if(sender == self.tenthLoveBtn){
num = 10;
}else{
}else if(sender == self.hundredthLoveBtn){
num = 100;
}else{
num = 200;
}
if(self.setModel.ticketNum.integerValue >= num){
[self pickButtonActionWithNum:num];
@@ -679,6 +689,15 @@ UIKIT_EXTERN NSString * const kRoomReceivedCandyNotificationKey;
}
return _hundredthLoveBtn;
}
- (UIButton *)twoHundredhLoveBtn{
if(!_twoHundredhLoveBtn){
_twoHundredhLoveBtn = [UIButton new];
_twoHundredhLoveBtn.yn_acceptEventInterval = 1;
[_twoHundredhLoveBtn setBackgroundImage:kImage(@"room_candy_two_hundredth_tap_bg") forState:UIControlStateNormal];
[_twoHundredhLoveBtn addTarget:self action:@selector(fineLoveAction:) forControlEvents:UIControlEventTouchUpInside];
}
return _twoHundredhLoveBtn;
}
- (XPCandyTreeBuyView *)buyView{
if(!_buyView){
_buyView = [[XPCandyTreeBuyView alloc]initWithFrame:CGRectZero];