Fields not refreshing after zoom in NSCollectionView

I have an NSScrollView wrapping an NSCollectionView, with zoom all configured on a storyboard. The NSCollectionViewItem(s) within this contain an image and multiple labels and notes. Zoom works fine (via trackpad) and properly resizes the item, however only the image resizes (at first), the text goes away. But if I close/open to force draw of the view, the text is visible in the new size.

It appears that when the zoom finishes, needs display isn't being communicated to the item or perhaps fields in the item.

Any suggestions?

Answered by JVSherwood in 706054022

Fwiw I had two collection views, one which worked and the other that did as describe above. The only difference was a heigh constraint on the image. Once I added a height constraint on the image then zoom works fine.

Could you show the related code ?

What do you resize ? Image with pinch ? If so, maybe only the image receives the needsDisplay ? Or do you ask for reload of the parent view ?

Are there constraints defined for the textFields ?

Accepted Answer

Fwiw I had two collection views, one which worked and the other that did as describe above. The only difference was a heigh constraint on the image. Once I added a height constraint on the image then zoom works fine.

Fields not refreshing after zoom in NSCollectionView
 
 
Q