title: In iOS 12, when does the UICollectionView layout cells, use autolayout in nib
body: <p>Same code like this</p>
  
  <pre><code>collectionLayout.estimatedItemSize = CGSize(width: 50, height: 25)
  collectionLayout.itemSize = UICollectionViewFlowLayoutAutomaticSize
  collectionLayout.minimumInteritemSpacing = 10 
  
  for _ in 0 ..&lt; 1000 {
      let length = Int(arc4random() % 8)
      let string = randomKeyByBitLength(length)
      array.append(string!)
  }
  collectionView.reloadData()
  </code></pre>
  
  <p>cell constraints:</p>
  
  <p><a href="https://i.stack.imgur.com/jvQpt.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/jvQpt.jpg" alt="enter image description here"></a></p>
  
  <p>when I run it on iOS 12, it's different.
  left simulator is iOS 11, and right is iOS 12:</p>
  
  <p><a href="https://i.stack.imgur.com/fqAhC.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/fqAhC.jpg" alt="enter image description here"></a></p>
  
  <p>But, when I scroll it, cells's frames will be normal.</p>
  
  <hr>
  
  <p>Sample project to reproduce the issue: <a href="https://github.com/Coeur/StackOverflow51375566" rel="noreferrer">https://github.com/Coeur/StackOverflow51375566</a></p>