It's unclear how to render the estimated size with the width value 0.0, and height value 0.0.
The code below seems unnecessary.
// Avoid the item view rendering 0.0 width without a width constraint.
if
itemView.frame.width == 0.0
&& estimatedSize.width >= 0.0 {
itemView.frame.size.width = estimatedSize.width
}
// Avoid the item view rendering 0.0 height without a height constraint.
if
itemView.frame.height == 0.0
&& estimatedSize.height >= 0.0 {
itemView.frame.size.height = estimatedSize.height
}
It's unclear how to render the estimated size with the width value 0.0, and height value 0.0.
The code below seems unnecessary.
// Avoid the item view rendering 0.0 width without a width constraint. if itemView.frame.width == 0.0 && estimatedSize.width >= 0.0 { itemView.frame.size.width = estimatedSize.width } // Avoid the item view rendering 0.0 height without a height constraint. if itemView.frame.height == 0.0 && estimatedSize.height >= 0.0 { itemView.frame.size.height = estimatedSize.height }