修改魔法帽半屏高度

This commit is contained in:
chenshuanglin
2023-03-21 20:24:28 +08:00
parent d38c6804f6
commit c77e6eea35
4 changed files with 16 additions and 1 deletions

View File

@@ -118,6 +118,7 @@ NSString * const kCandyTreeHideMessage = @"kCandyTreeHideMessage";
case CandyTreeMoreItemType_Buy:
{
XPRoomHalfWebView * webView = [[XPRoomHalfWebView alloc] init];
webView.isCandyTree = YES;
webView.url = URLWithType(kCandyTreeURL);
TTPopupService * config = [[TTPopupService alloc] init];
config.maskBackgroundAlpha = 0;

View File

@@ -389,6 +389,7 @@
[TTPopup alertWithConfig:config confirmHandler:^{
[TTPopup dismiss];
XPRoomHalfWebView * webView = [[XPRoomHalfWebView alloc] init];
webView.isCandyTree = YES;
webView.url = URLWithType(kCandyTreeURL);
[TTPopup popupView:webView style:TTPopupStyleAlert];
} cancelHandler:^{
@@ -550,7 +551,7 @@
if (!_expendLabel) {
_expendLabel = [[UILabel alloc] init];
_expendLabel.font = [UIFont fontWithName:@"PingFang-SC-Medium" size:10];
_expendLabel.textColor = [UIColor whiteColor];
_expendLabel.textColor = [ThemeColor colorWithHexString:@"#DCC3FF"];
_expendLabel.textAlignment = NSTextAlignmentCenter;
_expendLabel.text = @"消耗1糖果连续摘";
}

View File

@@ -16,6 +16,9 @@ NS_ASSUME_NONNULL_BEGIN
///是否是航海
@property (nonatomic,assign) BOOL isSailing;
/// 是否是糖果树
@property (nonatomic,assign) BOOL isCandyTree;
@end
NS_ASSUME_NONNULL_END

View File

@@ -128,6 +128,16 @@
}
}
- (void)setIsCandyTree:(BOOL)isCandyTree {
_isCandyTree = isCandyTree;
if (_isCandyTree) {
[self.stackView mas_updateConstraints:^(MASConstraintMaker *make) {
CGFloat kscale = 600.0 / 375.0;
make.height.mas_equalTo(KScreenWidth * kscale);
}];
}
}
- (UIStackView *)stackView {
if (!_stackView) {
_stackView = [[UIStackView alloc] init];