优化内购交易重试机制,增加交易重试次数记录,完善后台任务处理,更新相关API接口,调整UI组件约束,修复部分UI问题,更新本地化字符串。版本号更新至20.20.63。
This commit is contained in:
@@ -295,11 +295,12 @@ static const CGFloat kSectionSpacing = 20.0;
|
||||
TZImagePickerController *imagePickerVc = [[TZImagePickerController alloc] initWithMaxImagesCount:1 delegate:self];
|
||||
imagePickerVc.allowCrop = YES;
|
||||
|
||||
// 获取eventBannerImageView的实际尺寸比例
|
||||
CGFloat viewWidth = self.view.frame.size.width - (kHorizontalPadding * 2 - 2);
|
||||
CGFloat viewHeight = kGetScaleWidth(118);
|
||||
CGFloat cropWidth = MIN(viewWidth, KScreenWidth);
|
||||
CGFloat cropHeight = (viewHeight / viewWidth) * cropWidth;
|
||||
// 调整裁剪比例为 690:236
|
||||
CGFloat aspectRatio = 690.0 / 236.0; // 约为2.92:1
|
||||
|
||||
// 计算裁剪框宽度,限制在屏幕宽度内
|
||||
CGFloat cropWidth = MIN(self.view.frame.size.width - (kHorizontalPadding * 2 - 2), KScreenWidth);
|
||||
CGFloat cropHeight = cropWidth / aspectRatio;
|
||||
|
||||
// 设置裁剪框的尺寸
|
||||
imagePickerVc.cropRect = CGRectMake((KScreenWidth-cropWidth)/2, (KScreenHeight - cropHeight) / 2, cropWidth, cropHeight);
|
||||
@@ -392,6 +393,21 @@ static const CGFloat kSectionSpacing = 20.0;
|
||||
notifyFans:notifyFans];
|
||||
}];
|
||||
} cancelHandler:^{ }];
|
||||
} else {
|
||||
@kWeakify(self);
|
||||
[self uploadCover:bannerImage
|
||||
finish:^(NSString *path) {
|
||||
@kStrongify(self);
|
||||
[self.presenter createEventWithTitle:title
|
||||
image:path
|
||||
uploadToHome:uploadToHomepage
|
||||
startTime:startTime
|
||||
duration:self.durationMinutes
|
||||
content:content
|
||||
gold:uploadToHomepage ? self.configModel.goldNum : 0
|
||||
roomUid:self.selectRoomModel.roomUid
|
||||
notifyFans:notifyFans];
|
||||
}];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -508,8 +524,9 @@ static const CGFloat kSectionSpacing = 20.0;
|
||||
UIImage *selectedImage = info[UIImagePickerControllerOriginalImage];
|
||||
if (selectedImage) {
|
||||
// 对于iOS 14以下版本,选择图片后手动裁剪
|
||||
CGFloat aspectRatio = 690.0 / 236.0; // 约为2.92:1
|
||||
CGFloat viewWidth = self.view.frame.size.width - (kHorizontalPadding * 2 - 2);
|
||||
CGFloat viewHeight = kGetScaleWidth(118);
|
||||
CGFloat viewHeight = viewWidth / aspectRatio;
|
||||
CGSize cropSize = CGSizeMake(viewWidth, viewHeight);
|
||||
|
||||
UIImage *croppedImage = [selectedImage cutImage:cropSize];
|
||||
@@ -587,7 +604,9 @@ static const CGFloat kSectionSpacing = 20.0;
|
||||
[self.eventBannerImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.equalTo(self.eventBannerLabel.mas_bottom).offset(kVerticalPadding);
|
||||
make.leading.trailing.equalTo(self.contentView).inset(kHorizontalPadding-1);
|
||||
make.height.mas_equalTo(kGetScaleWidth(118)); // Adjust height as needed
|
||||
|
||||
// 设置高度为宽度除以690:236的比例
|
||||
make.height.equalTo(self.eventBannerImageView.mas_width).multipliedBy(236.0/690.0);
|
||||
}];
|
||||
[self.eventBannerCamearImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.bottom.trailing.equalTo(self.eventBannerImageView);
|
||||
|
Reference in New Issue
Block a user