Commit a2d7dedd authored by David黄金龙's avatar David黄金龙

1、处理 一处编译不过的bug

2、一处UI展示优化
parent 180a561f
......@@ -210,7 +210,7 @@ class YHFormItemDoubleChoiceCell: UITableViewCell {
var bounds = CGRect()
let maxWidth = KScreenWidth-16*2-horizonalGap*2
bounds = NSString(string:tips).boundingRect(with: CGSize(width:maxWidth, height: .greatestFiniteMagnitude), options: [.usesLineFragmentOrigin], attributes: [.font : titleFont], context: nil)
tipsHeight = ceill(bounds.size.height)
tipsHeight = Double(ceill(Float80(bounds.size.height)))
}
tipsLabel.snp.updateConstraints { make in
make.height.equalTo(tipsHeight)
......
......@@ -22,8 +22,8 @@ class YHPreviewAcademicAndProfessionalQualificationViewController: YHPreviewBase
private extension YHPreviewAcademicAndProfessionalQualificationViewController {
func loadData() {
if let orderID = UserDefaults.standard.value(forKey: "orderIdForPreview") {
let tmp = 133967 //for test hjl todo
previewVM.getPreviewForAcademicInfo(params: ["order_id" : tmp]) { success, error in
// let tmp = 133967 //全数据 可测试
previewVM.getPreviewForAcademicInfo(params: ["order_id" : orderID]) { success, error in
if success == true {
} else {
......
......@@ -36,7 +36,6 @@ class YHPreviewInfoQuestionAndAnswerItemView: UIView {
lable0.font = UIFont.PFSC_R(ofSize: 14)
lable0.numberOfLines = 0
lable0.lineBreakMode = .byWordWrapping
// lable0.textAlignment = .right
return lable0
}()
......@@ -62,40 +61,15 @@ class YHPreviewInfoQuestionAndAnswerItemView: UIView {
}()
// private lazy var remarkTextField : UITextView = {
// let lable0 = UITextView(frame: .zero)
// lable0.contentInset = UIEdgeInsets(top: 20, left: 12, bottom: 12, right: 12)
// lable0.textColor = UIColor.labelTextColor2
// lable0.font = UIFont.PFSC_R(ofSize: 14)
// lable0.backgroundColor = .contentBkgColor
// lable0.layer.cornerRadius = kCornerRadius6
// lable0.clipsToBounds = true
// lable0.isEditable = false
// lable0.isSelectable = false
// lable0.isScrollEnabled = false
// lable0.text = "我是测试数据哈"
// lable0.isHidden = true
// return lable0
// }()
private func setupUI() {
addSubview(nameLable)
nameLable.snp.makeConstraints { make in
make.top.equalToSuperview().offset(18)
make.left.equalToSuperview()
make.right.equalToSuperview()
make.height.equalTo(20)
}
addSubview(subtitleLable)
// subtitleLable.snp.makeConstraints { make in
// make.top.equalTo(nameLable.snp.bottom).offset(8)
// make.right.equalToSuperview()
// make.left.equalToSuperview()
//
// make.bottom.equalToSuperview()
// }
}
var dataModel : YHPreviewQuestionAndAnswerModel? {
......@@ -109,7 +83,6 @@ extension YHPreviewInfoQuestionAndAnswerItemView {
func updateUI() {
guard let model = dataModel else { return }
removeSubviews()
setupUI()
......@@ -117,7 +90,6 @@ extension YHPreviewInfoQuestionAndAnswerItemView {
subtitleLable.text = model.answer
if let remark = model.remark {
subtitleLable.snp.makeConstraints { make in
make.top.equalTo(nameLable.snp.bottom).offset(8)
make.right.equalToSuperview()
......
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