forkingdog / UITableView-FDTemplateLayoutCell

Template auto layout cell for automatically UITableViewCell height calculating
MIT License
9.93k stars 2.01k forks source link

fix condition bug about debugging log. #322

Open ParsifalC opened 7 years ago

ParsifalC commented 7 years ago

This PR contains two commits.One for the typo issue,and another for the log issue. Here's something about the debugging log issue.The contentView is added into a cell using auto-layout instead of frame in iOS 10.3.According to the log of a cell created with frame,we can see these constraints below:

(lldb) po cell.contentView.constraints
<__NSArrayI 0x174050e60>(
<NSLayoutConstraint:0x17409f4a0 'UIView-Encapsulated-Layout-Height' UITableViewCellContentView:0x10041a110.height == 44   (active)>,
<NSAutoresizingMaskLayoutConstraint:0x17409f4f0 h=--- v=--- 'UIView-Encapsulated-Layout-Left' UITableViewCellContentView:0x10041a110.minX == 0   (active, names: '|':TableViewCell:0x10085de00'TableViewCell' )>,
<NSAutoresizingMaskLayoutConstraint:0x17409f540 h=--- v=--- 'UIView-Encapsulated-Layout-Top' UITableViewCellContentView:0x10041a110.minY == 0   (active, names: '|':TableViewCell:0x10085de00'TableViewCell' )>,
<NSLayoutConstraint:0x17409f450 'UIView-Encapsulated-Layout-Width' UITableViewCellContentView:0x10041a110.width == 320   (active)>
)

Right.It always gets 4 initial constraints. Hope this helps although it's just a debugging log issue.