riteshhgupta / TagCellLayout

Made in Swift - Tag layout for UICollectionView supporting 3 types of alignments - Left || Centre || Right
MIT License
358 stars 36 forks source link

Update TagCellLayout.swift #6

Closed spacecaps-cao closed 8 years ago

spacecaps-cao commented 8 years ago

Add a variable called "lineNumber" to record how many lines of tags view. So that users can calculate the contentSize of UICollectionView dynamically and change the constraints of UICollectionView. (In the case of this UICollectionView is embeded in other views or animationing)

riteshhgupta commented 8 years ago

@Cao-Yu thanks for the PR & it looks good but just one thing, you forgot to reset the lineNumber in resetLayoutState() method. Can you please do that as well ?