As all Apple fans would say, we have seen iOS revolutionise the mobile operating system since 2007. Each year, we see iOS redefine simplicity and usability for its users. Isn’t that what the masses look for – something that’s super easy to understand, super easy to use, with minimal cognitive overload. It just works! If a system doesn’t make a user think, then the system does really know them well.
Specifically for developers, Apple has ensured that it does not only provide a well designed platform to build upon, but also one that is secure at the same time. Even though, at this point in time, India would only account for a small number of iOS users, there is still a large section of passionate developers who wish to develop and engineer iOS apps in the Indian subcontinent.
Keeping this in mind, we organised our 7th Huddle on iOS – to explore the latest developments, frameworks and best practices utilised to tackle challenges in this space.
What we saw was an inflow of 60 developers from organisations such as 1Mg, Goibibo, PayTM, Ixigo, Nokia, Nykaa, Droom, and many more on a beautiful rainy afternoon at the Zomato headquarters.
For those who couldn’t be there, here is a brief of what our expert speakers had to say –
- Ritesh Gupta (iOS Developer, Over)
Topic: Handling complex async tasks using Combine
Ritesh walked us through Apple’s recently announced (at WWDC’19) reactive framework called Combine. He focused on how Combine, as a tool, works best to ensure effective solutions for the growing complexity in today’s apps.
By using Combine, developers can –
- Handle multiple async tasks with ease – Combine has numerous operators which have different strategies to tackle multiple async tasks such as merge, zip, combineLatest, etc.
- Achieve better state management – In imperative programming, the state tends to spread across the app, but with Combine we can keep it bounded to a stream and transform the value as required for individual subscribers
- Define loosely coupled components – Combine allows us to create atomic components via publishers or subscribers, which are composed together using operators such as merge and zip, leading to incredibly simple solutions
2. Nadzeya Stsepanchuk (iOS Developer and Instructor)
Topic: Tips and Tricks for smooth table scrolling in iOS
Our apps are constantly getting updated and are being fed with large amounts of data to meet consumer curiosity and demand. This makes it even more essential for developers to carefully achieve smooth scrolling, with an increasing level of detail for each aspect displayed.
Nadzeya gave us insights into some tips and tricks that can help ensure the best possible performance of an app, while using UITableView. As a developer –
a. With respect to cell optimisations, it may be useful to –
- Avoid reusing cells if they don’t need to be reused. It’s best to create once and cache it
- Avoid showcasing any loaders on cells
- Avoid reloading a cell if data is the same. Store or calculate all the data in a ViewModel if possible
b. With respect to image optimisations, it’s preferable to –
- Get images with exact size from the API
- Resize images to the exact size in a background thread
- Incorporate frameworks such as Texture to render images in the background
c. With respect to label optimisations, it’s important to –
- Have an opaque background for them
- Avoid using attributed string
- Not resize label via sizeToFit() to avoid additional calculations
3. Aamir Anwar (Software Development Engineer, Zomato)
Topic: SwiftUI – A brand new framework engineered to design apps using a declarative paradigm
Aamir’s talk focused on another new framework introduced by Apple at WWDC 2019 called SwiftUI, which embodies a declarative paradigm for building user interfaces on Apple Platforms.
He kicked off the session by going over the basics and then exploring areas such as SwiftUI with Combine, Diffing, Dark Mode and Interface Previews, just to name a few.
From his perspective, how can we best utilise SwiftUI?
- SwiftUI is built with speed in mind – It’s beneficial to ingrain as much reusability as possible by breaking down UI into small components
- Diffing is in place when a state change occurs, which provides incredibly fast rendering
- SwiftUI has been made compatible with UIKit and Objective-C so one can start incorporating it into our apps (iOS 13 and above) from day one
More than anything, this event showcased a good number of live demos from our speakers, which captured audience interest to a great degree. We were in the presence of passionate, young folks, mostly freshers and professionals who were deeply involved in understanding the pros and cons of the latest technologies that have hit this operating system.
We look forward to hosting more such events for our iOS community. For any queries or suggestions in relation to Huddle, do reach out to us at email@example.com.
At Zomato, we are constantly on the lookout for iOS engineers who are passionate, love challenges and create reliable products.
If you feel you’re a fit for such a role, do go ahead and check this out.