Open binfy opened 8 years ago
就是一个布局有问题,其他用到的都没问题,我先把手头的工作做完再看是什么原因吧?可能还是自己的布局有问题,待解决在来这里说。
那位兄弟知道这个啊
// Auto layout engine does its math fittingHeight = [cell.contentView systemLayoutSizeFittingSize:UILayoutFittingCompressedSize].height; 算这个高度的时候约束有问题,而且得到高度是900多,怎么解决呢? NSLayoutConstraint:0x17468c990 UITableViewCellContentView:0x153d532d0.width == 375, <NSLayoutConstraint:0x170890cc0 UITableViewCellContentView:0x153d532d0.width == 0
@yrx0910 Maybe you should paste your code here. And make your problem clear.
@sunwell I just use this library to calculate the cell height.Below iOS 10 it runs normal. "fittingHeight = [cell.contentView systemLayoutSizeFittingSize:UILayoutFittingCompressedSize].height;" this is the codes in the library.When runing to the codes ,i get the problem NSLayoutConstraint:0x17468c990 UITableViewCellContentView:0x153d532d0.width == 375, <NSLayoutConstraint:0x170890cc0 UITableViewCellContentView:0x153d532d0.width == 0
I solve this problem
unwanted constraint or constraints and fix it. ( UITableViewCellContentView:0x7ff18248a4c0.width == 375 UITableViewCellContentView:0x7ff18248a4c0.width == 0 ) 不知道怎么解决了