Picker is a control in SwiftUI which allows you to select a value from a list of possible options. In order to properly use a Picker, you need to back it with an array of possible options to choose from and a State variable storing the index of selected option in the array. In its …
Month: February 2020
Algorithms in Swift: Find two elements in the array that add up to given number
By popular demand, I’m starting a semi-regular series exploring common algorithm questions asked during iOS interviews. Let me know on Twitter if you’d like to see any particular algorithm or coding question answered. In this post, let’s solve the following problem in Swift: Given an array of numbers and another number called sum, find all …
How to add XCFramework to Xcode project
XCFramework is a new code distribution format introduced by Apple in Xcode 11. The new XCFramework bundle type (similar to framework bundle) now allows to support multiple architectures, platforms and simulator in one package. As XCFrameworks are gaining in popularity, iOS developers will need to know how to use them in their projects. This tutorial covers the steps …
How to add missing iPhone SE simulator in Xcode 11 with iOS 13 SDKs
You might have noticed that after upgrading to Xcode 11 with iOS 13 SDKs, Xcode’s list of iOS Simulators to run your app on does not include the iPhone SE simulator any more. The iPhone SE simulator comes very handy because we still need to support this device hence the need to test on it. In this …