Understanding SwiftUI's ViewModifiers and ViewBuilders

It has been more than a year since the release of SwiftUI, and we certainly had some interesting experiences with it so far. It can create a lot of  excitement, surprise, and sometimes a ton of annoyance too. If you have started making apps with SwiftUI, you might have encountered situations where if you used UIKit, the work would be done easily, but with SwiftUI it can sometimes take all day – even more. But since SwiftUI is still a baby, these things shouldn't stop one from learning and unwrapping its mysteries because, with time, it will grow, get better and make our app development way easier.

In this article, we are going to learn two of the key components of SwiftUI, which are ViewModifiers and ViewBuilders. ViewModifiers play a significant role in SwiftUI. Most of the functions called on a SwiftUI View are view modifiers. It is the primary way of modifying a view in SwiftUI. As for ViewBuilders, it is mainly used to create custom container views, which can also become a reusable view component.

In this post, we will take a look at some ready-to-use modifiers, then we will build our own custom view modifier and create a reusable custom container view with ViewBuilder. Using this we can implement gorgeous design systems that are consistent across the entire app and encourage code reusability and good architectural patterns.

Read more


How Mobile Apps have made life easy during lockdown

With the advancement of technology one of the major inventions by mankind is mobile devices, that has become an unavoidable part of our life. Gone are the days when people used to look upon these devices as an ordinary communication medium. Now it is much more than that. The availability and access of high-speed internet and interactive features on smartphones has resulted in a whole new level of experience in the form of mobile applications. 

We human beings are always on a lookout to make our lives easier and comfortable and hence have developed a range of applications that assists us in our day to day life. Honestly speaking mobile apps have changed the way we work, play and communicate with each other. According to reports by 2022 annual mobile app downloads are projected to reach 258 billion. Mobile apps have become a vital part of almost every industry sector - education, banking, healthcare, entertainment, production & manufacturing, and many others. The apps have come to our rescue whether you have run out of cash, have no time to dine in, do not want to stand in a long ticket queue, forgot to pay bills, etc. 

Read more


How technology is helping people amid Coronavirus outbreak

In today’s era, widely and rapidly spreading diseases is a huge concern for medical professionals around the globe. And currently, the world is fighting with one such disease, Coronavirus, that has taken the shape of Pandemic. While treatments are still in development, health professionals look up to technology as a saviour when it comes to diagnosing and tackling the ailment. 

Not only the medical experts, but the deadly virus has also prompted many to look upon fast-growing technology as their pal. In the time of lockdown and social isolation when daily life is at a standstill, technology has already started to make a difference. The futuristic technologies are making the lives of people in quarantine livable.

So, here I will talk about a few ways in which technology is helping mankind amid Coronavirus outbreak

Read more


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


How to avoid digital distraction to maintain work life balance

Digital distraction is the leading problem of today’s human being at the workplace and home. On our desktops, tablets, smartphones, and smartwatches we are constantly exposed to messages, notifications, reminders, and pop-ups and it is becoming increasingly difficult to focus on the task at hand and avoid delays.

We all are aware that spending too much time on digital devices can adversely affect our work and personal life, but technology is so pervasive today that it is really hard to stay away from our phones and other devices that cause distraction.

So, what is Digital Distraction?

Read more