Commit e6668800 authored by Alex朱枝文's avatar Alex朱枝文

移除动态刷新的代码

parent 5fe60bf1
......@@ -8936,7 +8936,7 @@
CODE_SIGN_ENTITLEMENTS = yinheReplayExt/yinheReplayExt.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 6;
CURRENT_PROJECT_VERSION = 7;
DEVELOPMENT_TEAM = RXHYW88XR7;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = yinheReplayExt/Info.plist;
......@@ -8966,7 +8966,7 @@
CODE_SIGN_ENTITLEMENTS = yinheReplayExt/yinheReplayExt.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 6;
CURRENT_PROJECT_VERSION = 7;
DEVELOPMENT_TEAM = RXHYW88XR7;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = yinheReplayExt/Info.plist;
......@@ -8996,7 +8996,7 @@
CODE_SIGN_ENTITLEMENTS = yinheReplayExt/yinheReplayExt.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 6;
CURRENT_PROJECT_VERSION = 7;
DEVELOPMENT_TEAM = RXHYW88XR7;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = yinheReplayExt/Info.plist;
......@@ -9026,7 +9026,7 @@
CODE_SIGN_ENTITLEMENTS = yinheReplayExt/yinheReplayExt.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 6;
CURRENT_PROJECT_VERSION = 7;
DEVELOPMENT_TEAM = RXHYW88XR7;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = yinheReplayExt/Info.plist;
......@@ -9115,7 +9115,7 @@
CODE_SIGN_ENTITLEMENTS = galaxy/galaxyTestEnv.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 6;
CURRENT_PROJECT_VERSION = 7;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = RXHYW88XR7;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
......@@ -9264,7 +9264,7 @@
CODE_SIGN_ENTITLEMENTS = galaxy/galaxy.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 6;
CURRENT_PROJECT_VERSION = 7;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = RXHYW88XR7;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
......@@ -9475,7 +9475,7 @@
CODE_SIGN_ENTITLEMENTS = galaxy/galaxyDebug.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 6;
CURRENT_PROJECT_VERSION = 7;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = RXHYW88XR7;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
......@@ -9526,7 +9526,7 @@
CODE_SIGN_ENTITLEMENTS = galaxy/galaxy.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 6;
CURRENT_PROJECT_VERSION = 7;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = RXHYW88XR7;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
......
......@@ -251,14 +251,15 @@ extension YHCircleViewController: UICollectionViewDelegate, UICollectionViewData
}
let model = arr[indexPath.row]
cell.listModel = model
cell.onImageHeightChanged = { [weak self] in
guard let self = self else {
return
}
UIView.performWithoutAnimation {
self.circleCollectView.reloadData()
}
}
// 暂不处理,可能出现渲染问题
// cell.onImageHeightChanged = { [weak self] in
// guard let self = self else {
// return
// }
// UIView.performWithoutAnimation {
// self.circleCollectView.reloadData()
// }
// }
cell.clickHeartEvent = { [weak self, weak cell] in
guard let self = self else {
return
......
......@@ -207,42 +207,42 @@ class YHCircleCollectionViewCell: UICollectionViewCell {
}
if let firstResource = model.firstImageResource, !firstResource.url.isEmpty, let url = URL(string: firstResource.url) {
titleImageView.kf.setImage(with: url, placeholder: UIImage(named: "plan_product_default")) { result in
switch result {
case let .success(value):
DispatchQueue.global().async {
var needRefreshHeight = false
let size = value.image.size
let scale = size.width > 0 ? Double(size.height / size.width) : 0.0
if scale > 0 {
let width = (KScreenWidth - 47) / 2
let height = scale * width
if height >= model.maxImageHeight, model.img_height_use >= model.maxImageHeight {
return
}
if height <= model.minImageHeight, model.img_height_use <= model.minImageHeight {
return
}
if abs(height - model.img_height_use) > 10 {
model.calHeightParam(height)
needRefreshHeight = true
}
}
DispatchQueue.main.async {
if needRefreshHeight {
self.titleImageView.snp.remakeConstraints { make in
make.left.right.top.equalToSuperview()
make.height.equalTo(model.img_height_use)
}
self.onImageHeightChanged?()
}
}
}
case .failure:
printLog("kf setImage failed")
}
titleImageView.kf.setImage(with: url, placeholder: UIImage(named: "plan_product_default")) { _ in
// switch result {
// case let .success(value):
// DispatchQueue.global().async {
// var needRefreshHeight = false
// let size = value.image.size
// let scale = size.width > 0 ? Double(size.height / size.width) : 0.0
// if scale > 0 {
// let width = (KScreenWidth - 47) / 2
// let height = scale * width
// if height >= model.maxImageHeight, model.img_height_use >= model.maxImageHeight {
// return
// }
// if height <= model.minImageHeight, model.img_height_use <= model.minImageHeight {
// return
// }
// if abs(height - model.img_height_use) > 10 {
// model.calHeightParam(height)
// needRefreshHeight = true
// }
// }
//
// DispatchQueue.main.async {
// if needRefreshHeight {
// self.titleImageView.snp.remakeConstraints { make in
// make.left.right.top.equalToSuperview()
// make.height.equalTo(model.img_height_use)
// }
// self.onImageHeightChanged?()
// }
// }
// }
//
// case .failure:
// printLog("kf setImage failed")
// }
}
} else {
titleImageView.image = UIImage(named: "plan_product_default")
......
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