weijentu / automatic-height-tagcells

This is a sample project to implement features with dynamic height of UITableViewCell based on autolayout, tags aligned automatically and clickable tags.
http://www.xcodeproj.com
MIT License
225 stars 36 forks source link

UItableview scrolling not smooth #11

Closed SalmanAhmedDev closed 6 years ago

SalmanAhmedDev commented 6 years ago

Hi,

You done a grade work but i m facing small issue when i increase records with around 25 tags Tableview scrolling not smooth and some jerky.

Thanks

weijentu commented 6 years ago

Hi @SalmanAhmedDev, do you mean 25 tags in one cell, or 25 tags total in one table?

SalmanAhmedDev commented 6 years ago

25 tag in one cell

weijentu commented 6 years ago

I see. I think the issue comes from a bad estimation of the cell height. If you set 376.5 as estimated height, you will see the improvement. Or if all cells have the same count of tags and more than 25 in total, the issue will be gone.

I suggest you can take a look of this post: Jerky Scrolling After Updating UITableViewCell in place with UITableViewAutomaticDimension

Cheers,

SalmanAhmedDev commented 6 years ago

Ok will update you. Thanks for your time

SalmanAhmedDev commented 6 years ago

i have run simulator its working fin but when i run device OS 10.0.2, Still scrolling issues :( here is video link : https://streamable.com/d8r7r

SalmanAhmedDev commented 6 years ago

@weijentu have you check video?

weijentu commented 6 years ago

Yeah, my suggestion is to increase estimate height if you have many cells with larger height.

SalmanAhmedDev commented 6 years ago

Yup i have increased to 400, but still not solved :(

weijentu commented 6 years ago

Hmm, it's probably owing to auto layout is a mechanism for dynamic size change at runtime; therefore, some sacrifice for performance might be unavoidable.