Daily List Dispatch Group Fetches
AppStore JSON APIs
Today's lesson will focus our attention on utilizing a Dispatch Group again to help synchronize data across all of the cells in our TodayController. One thing I strongly recommend is to keep your service fetch calls outside of your view layer, this way all of your data is held in one single place. This single place should be the TodayController and we'll be fetching our data from there. Enjoy.

Comments (3)
Tube
4 years ago
Hi! I like these articles on optimizing table performance: calebhicks/iTunesSearch https://github.com/calebhicks/iTunesSearch Dealing with Complex Table Views in iOS and Keeping Your Sanity https://medium.cobeisfresh.com/dealing-with-complex-table-views-in-ios-and-keeping-your-sanity-ff5fee1fbb83
Brian Voong
4 years ago
Tube
4 years ago
It's working well. I have big delay due to loading JSON from China. But, the UI is very responsive.
Brian Voong
4 years ago
Nhon Nguyen
4 years ago
Hi Brian, I noticed from many previous episodes that you are not aware of using [weak self] in network closure or [unowned self] in animation closure. As far as I know these practices will cause retain cycles. What do you think?
Brian Voong
4 years ago
Nhon Nguyen
4 years ago
Thank you for your prompt reply. As you said it is somewhat hard to determine. I look forward to a video about this subject. Have a nice day.
Alex Vorojbit
2 years ago
Hello Brian! How can I use dynamic fetch from JSON for all TodayController sections and TodayMultipleAppsController sections using UICollectionViewDiffableDataSource and NSDiffableDataSourceSnapshot? Because you have hardcoded.. but I want to display from JSON.
Brian Voong
2 years ago
Alex Vorojbit
2 years ago
Yeah, I made this, but don't know how to really make multiple fetches as you did using DispatchGroup, because you have hardcoded the items in main CollectionView. But I want to fetch data from JSON. Also I'm using UICollectionViewDiffableDataSource and NSDiffableDataSourceSnapshot. Thank you!
HELP & SUPPORT