lundi 18 juillet 2016

adding UICollectionViewCell with dynamically changed cell width makes minimumInteritemSpacing no effect?

In the demo project I can press "add a new tag"button to add a UICollectionViewCell whoes label contains my newly input text.

This is the target effect:

target effect

This is current situation: wrong effect

In the current state, i reconfigure cell UI in cellForItemAtIndexPath function and resize cell size in sizeForItemAtIndexPath function. But these operations seem cause the minimumInteritemSpacing not work. I use the UICollectionViewFlowLayout.

Aucun commentaire:

Enregistrer un commentaire