#swift

Found 83 articles tagged with #swift

iOS Interview Questions (UIKit)

UIKit is a framework that was introduced by Apple in 2007 alongside the original iPhone. Today, UIKit remains a crucial part of the iOS development toolkit and is used by developers worldwide.

Apr 14, 2023#ios#swift#uikit

How to encode and decode JSON data in Swift

With Codable, you can easily convert Swift objects to data representations and vice versa, without having to write complex serialization and deserialization code.

Apr 08, 2023#swift#how-to

Swift KeyPath vs #keyPath()

Swift key paths are a way of storing uninvoked references to properties, which is a fancy way of saying they refer to a property itself rather than to that property’s value.

Apr 07, 2023#swift

Swift Conditional Compilation for Attributes

Using conditional directive hasAttribute to simplify code that needs to be conditionally compiled based on the presence or absence of certain attributes.

Apr 03, 2023#swift

Swift actor isolated vs nonisolated

Swift actor isolation is a feature of Swift concurrency that allows actors to protect their state from concurrent access by other actors or….

Apr 02, 2023#swift#concurrency

Swift function back deployment

Function back deployment, using new @backDeployed attribute in Swift 5.8, is a feature that allows library authors to make new APIs available on older platform versions.

Apr 01, 2023#swift#attributes

How to Implement Type Erasure in Swift

Type erasure in Swift is a technique that lets you use generic protocols or protocols with associated types as concrete types, by hiding or erasing the specific type information.

Apr 01, 2023#swift#how-to

Swift existential types (`any P`)

The `any` keyword in Swift was introduced in Swift 5.6 and improved in Swift 5.7. It is used to create an existential type that represents any concrete type that conforms to a specific protocol.

Mar 31, 2023#swift

Swift heterogeneous collections (mixed arrays, sets, dictionaries)

Swift provides three primary collection types —arrays, sets, and dictionaries— implemented as generic types, which means they can store any….

Mar 31, 2023#swift#faqs

Swift Task Groups

Swift task groups (TaskGroup, ThrowingTaskGroup) are a feature introduced in Swift 5.5 that allow you to create and manage a collection of….

Mar 31, 2023#swift#concurrency