Introducing Diffable Data Source

Ever since the evolution of iOS SDK, it has been the responsibility of the data source, to provide the table-views and collection-views with the data they need to create, configure and display its cells and supplementary views. For this, we are required to implement the necessary protocol (UITableViewDataSource or UICollectionViewDataSource) methods and sync our updated data-model with the data source properly to avoid any synchronization bugs. This approach has been used for a decade now but still, it has quirks and fallout which could sometimes give you a headache.

With iOS 13.0, Apple provided a couple of really cool API’s for both table-views and collection-views. One of these cool features is Diffable Data Sources. In today’s article, I will show you how to use UICollectionViewDiffableDataSource to drive your collection-views. By the end of this article, you will know exactly how to use Diffable Data Sources and what their caveats are. But before that let’s discuss and understand why Apple had to provide a brand new API for data sources. Let’s dive in!

Read more


What's New in Core Location

Apple showcased a lot of major changes in WWDC19, with SwiftUI creating a lot of buzz among the developers. But there were also some other changes that are important and will be affecting the user experience right now. One of them is the updates in the Core Location framework.

iOS 13 improves user privacy related to location sharing. If your app needs the location of the user to recommend or display content, you may need to investigate if your app is still running properly.

Starting from iOS 13, users will be getting a new option to share their location just once. They’ve also empowered While in Use permission and changed many other things. Assuming that you have already worked with Core Location before, let's discuss the updates in detail.

Read more


Customizing Layout for UICollectionView

Almost every application contain a list screen where a vertical/horizontal list of scrollable items is used. Except a few, almost all cases can be fulfilled either by a TableView, or a CollectionView using Flow-Layout. In this post, we will be working on one of such few cases, creating a Custom CollectionView Layout for implementing a Mark-Sheet layout, showing user’s achieved marks in their respective subjects like:

Read more