Slide for my presentation in "Designers meet Developers Mashup Meetup #6 (May 2017)" (https://www.meetup.com/apps_jakarta/events/238917160/?comment_table_id=252339089&comment_table_name=reply)
2. SMOOTH SCROLLING FOR UITABLEVIEW IN IOS
WHO AM I?
▸ Ricardo Pramana Suranta (Edo)
▸ Software Engineer at Ice House Corp.
▸ iOS Developer for 3.5 years, Mobile for ~4 years
▸ Twitter / GitHub: edopelawi
27. SMOOTH SCROLLING FOR UITABLEVIEW IN IOS
HOW TO CREATE AND BIND CELL
▸ Create on tableView(_:cellForRowAt:)
▸ Bind the data on tableView(_:willDisplay:forRowAt:)
▸ Add 0.2 - 0.5 seconds data validation in UITableViewCell
▸ Bind data in Main thread
29. SMOOTH SCROLLING FOR UITABLEVIEW IN IOS
UH OH. (WHY?)
▸ UITableViewAutomaticDimension
▸ AutoLayout
▸ Data binding on tableView(_:cellForRowAt:)
30. SMOOTH SCROLLING FOR UITABLEVIEW IN IOS
UH OH. (SOLUTION!)
▸ Count manually!
▸ Fast operations: addition, reduction, multiplication,
division
▸ Use UIFont, String, and known width to count multiline
label height
35. SMOOTH SCROLLING FOR UITABLEVIEW IN IOS
HOW TO (SC)ROLL SMOOTHLY (CONCLUSION)
▸ Thread usage
▸ Use fast operations in Main thread
▸ Rendering
▸ Prevent color-blended layers
▸ Use similar background colors
36. SMOOTH SCROLLING FOR UITABLEVIEW IN IOS
HOW TO (SC)ROLL SMOOTHLY (CONCLUSION)
▸ Cell creation
▸ Bind in tableView(_:willDisplay:forRowAt:)
▸ Add delay to prevent unnecessary binding
▸ Height Calculation
▸ Don’t use UITableViewAutomaticDimension
▸ Empty state
37. SMOOTH SCROLLING FOR UITABLEVIEW IN IOS
FURTHER OPTIMIZATION
▸ Non-Auto Layout UI (CGFrame, CGRect, and old-school
stuffs)
▸ Rendering in CPU (drawRect:, low level stuffs)