Commit 2dadebe0 authored by pete谢兆麟's avatar pete谢兆麟

按钮状态

parent f5d86fdf
...@@ -2904,7 +2904,7 @@ ...@@ -2904,7 +2904,7 @@
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Manual; CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 8; CURRENT_PROJECT_VERSION = 9;
DEVELOPMENT_TEAM = ""; DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = RXHYW88XR7; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = RXHYW88XR7;
ENABLE_USER_SCRIPT_SANDBOXING = NO; ENABLE_USER_SCRIPT_SANDBOXING = NO;
...@@ -3105,7 +3105,7 @@ ...@@ -3105,7 +3105,7 @@
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Manual; CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 8; CURRENT_PROJECT_VERSION = 9;
DEVELOPMENT_TEAM = ""; DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = RXHYW88XR7; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = RXHYW88XR7;
ENABLE_USER_SCRIPT_SANDBOXING = NO; ENABLE_USER_SCRIPT_SANDBOXING = NO;
...@@ -3147,7 +3147,7 @@ ...@@ -3147,7 +3147,7 @@
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Manual; CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 8; CURRENT_PROJECT_VERSION = 9;
DEVELOPMENT_TEAM = ""; DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = RXHYW88XR7; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = RXHYW88XR7;
ENABLE_USER_SCRIPT_SANDBOXING = NO; ENABLE_USER_SCRIPT_SANDBOXING = NO;
......
...@@ -129,6 +129,9 @@ extension YHHomePageViewModel { ...@@ -129,6 +129,9 @@ extension YHHomePageViewModel {
callBackBlock(false,nil) callBackBlock(false,nil)
return return
} }
for item in result {
item?.calHeightParam()
}
self.arrHomeNewsData = result self.arrHomeNewsData = result
callBackBlock(true, nil) callBackBlock(true, nil)
} else { } else {
......
...@@ -216,6 +216,7 @@ class YHMyDocumentsDetailViewController: YHBaseViewController { ...@@ -216,6 +216,7 @@ class YHMyDocumentsDetailViewController: YHBaseViewController {
bottomView = { bottomView = {
let bottom = UIView() let bottom = UIView()
bottom.backgroundColor = .white bottom.backgroundColor = .white
bottom.isHidden = true
return bottom return bottom
}() }()
view.addSubview(bottomView) view.addSubview(bottomView)
......
...@@ -177,6 +177,7 @@ class YHMySignatureDetailViewController: YHBaseViewController { ...@@ -177,6 +177,7 @@ class YHMySignatureDetailViewController: YHBaseViewController {
bottomView = { bottomView = {
let bottom = UIView() let bottom = UIView()
bottom.backgroundColor = .white bottom.backgroundColor = .white
bottom.isHidden = true
return bottom return bottom
}() }()
view.addSubview(bottomView) view.addSubview(bottomView)
......
...@@ -99,30 +99,6 @@ extension YHServiceTableFootView: UICollectionViewDelegate, UICollectionViewData ...@@ -99,30 +99,6 @@ extension YHServiceTableFootView: UICollectionViewDelegate, UICollectionViewData
extension YHServiceTableFootView: CollectionViewWaterfallLayoutDelegate { extension YHServiceTableFootView: CollectionViewWaterfallLayoutDelegate {
func collectionView(_ collectionView: UICollectionView, layout: UICollectionViewLayout, sizeForItemAtIndexPath indexPath: NSIndexPath) -> CGSize { func collectionView(_ collectionView: UICollectionView, layout: UICollectionViewLayout, sizeForItemAtIndexPath indexPath: NSIndexPath) -> CGSize {
guard let model = items[indexPath.row] else { return CGSize.zero } guard let model = items[indexPath.row] else { return CGSize.zero }
let text = model.title return CGSize(width: model.img_width_cell, height: model.img_height_cell)
let width = (KScreenWidth - 47) / 2
let font = UIFont.PFSC_R(ofSize: 14) // 字体大小
let maxWidth = width - 16 // 最大宽度限制
// 创建NSAttributedString对象并设置属性
let attributes = [NSAttributedString.Key.font : font] as [NSAttributedString.Key : Any]
_ = NSMutableAttributedString(string: text, attributes: attributes)
// 根据指定的最大宽度和字体大小计算文本的高度
let size = (text as NSString).boundingRect(with: CGSize(width: maxWidth, height: .greatestFiniteMagnitude), options: .usesLineFragmentOrigin, attributes: attributes, context: nil).size
var textHeight = size.height
if textHeight > 40 {
textHeight = 40
}
let imageSize = getImageSize(model.img_url)
var imageHeight = 0.0
if imageSize.width == 0 {
imageHeight = width
} else {
imageHeight = width * imageSize.height/imageSize.width
if imageHeight > 280 {
imageHeight = 280
}
}
let totalHeight = imageHeight + textHeight + 46
return CGSize(width: width, height: totalHeight)
} }
} }
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