In-House Articles
Segmented Control In SwiftUI
We all would have seen something like “Your Feed” and “Profile” on apps like Twitter, Instagram and more. Similar experience can be implemented in iOS apps using Segmented Control. In this week’s article, learn about segmented control in SwiftUI.
Sliders In SwiftUI
A lot of times your app requires you to set a range or select a numeric from a large range. Sliders can be really helpful when dealing with situation like this. Learn about sliders in SwiftUI in this article.
How to convert Radians to Degrees in Swift?
In school, we all remember that geometry class where they taught about radians and degrees. When we learnt that, we would have seen no practical use of it but in production it is a core concept while dealing with animations and multiple dimensional planes. Learn about the conversation of Radians to degrees in this article.
Jobs
iOS Developer - Aisle
Location: Bengaluru, Karnataka
Company Description: Aisle is a high-intent dating app, the wise middle path between casual dating and matrimony apps. We were the 2nd most downloaded dating app in 2020 and rank 3rd among the top-grossing dating apps in India after Tinder & Bumble.
iOS Engineer - data.ai
Location: India (Remote)
Company Description: data.ai is the mobile standard and the trusted source for the digital economy. Our vision is to be the first Unified Data AI company that combines consumer and market data to provide insights powered by artificial intelligence.
Senior iOS Engineer - Nasdaq
Location: Bengaluru, Karnataka
Company Description: Nasdaq (Nasdaq: NDAQ) is a global technology company serving the capital markets and other industries. Our diverse offering of data, analytics, software and services enables clients to optimize and execute their business vision with confidence.
Cracking the iOS Interview
How do you handle errors in Swift?
In Swift, you can use the do-catch statement to handle errors. This has a simple syntax with a do block that contains the code that might throw an error, and a catch block to handle the errors that are thrown.
Explain the difference between synchronous and asynchronous code in Swift?
Synchronous code is executed in a linear manner, by executing each line of code one after the other. While asynchronous code is executed concurrently with other code, without blocking the execution of subsequent code. Asynchronous code allows your app to continue running while performing long-running tasks, such as network requests.
iOS Good Practices
Why should you avoid writing long methods?
It is always recommended to divide the code into multiple methods over a single long method. It helps you to write clean and reusable code and is easy to debug compared to a single method.
For example, we set up several things in the viewDidLoad()
method. Instead of writing everything in this method, we can make multiple small methods and call them in viewDidLoad()
. It looks more organized and efficient.