It's a technical question, or about good practices...
I have this App, its a social network, where we have the timeline. In this timeline I have to render a lot of cells on a tableview which I have done this way:
Also, I'm using:
tableView.estimatedRowHeight = 603 tableView.rowHeight = UITableViewAutomaticDimension
And, what is best way: storyboard, xib, or code?
So, my problem is that my scroll is lagging - I'm using reusable cells, but every time that tableview delegate calls cellForRow, I have to setupCell().
My first idea: I get the post array with a task then a create cells for each post and append this to an array of cells, so when cellForRow is called I just get the right cell from this array.. It make better. But still not enough(I'm testing on a iPhone 5c). My next ideia is create different cell for each kind of post, and save a variable for this cell of his size to setup on heighForCell method. You think that looks good solution? Can anyone give me an opinion and suggestion? I'am very tankful in advance..
After experimenting with possible solutions I decided to use AsyncDisplayKit to solve my problem, it offers great smooth scrolling.
It's complete SDK and has well written documentation so was easy to implement. I would recommend it if you are struggling with a similar issue to me.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.