#swift

Found 85 articles tagged with #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

Swift Task.init vs Task.detached

A task can run in the background and communicate with the UI thread when needed. To create and run a task in Swift, you can use initializers Task.init vs Task.detached.

Mar 31, 2023#swift#concurrency

6 ways to use "where" clause in Swift

The clause in Swift is a way to specify additional constraints on generic types, functions, associated types, or control flow statements….

Mar 30, 2023#swift

Swift Async/Await

Swift async/await is a new programming model introduced in Swift 5.5 (released on September 20, 2021) for writing asynchronous code that is….

Mar 28, 2023#concurrency#swift

The Problems with Completion Handlers in Swift

Asynchronous programming is an essential part of modern software development, allowing applications to perform long-running tasks without….

Mar 28, 2023#concurrency#swift

Type checking vs type casting in Swift

Swift provides several ways to check and cast types, which can be useful when working with objects that have been inherited from a superclass or implemented a protocol.

Mar 26, 2023#swift#types

What's New in Swift 5.9

This version will include features like convenience async stream methods, if and switch expressions, importing Objective-C forward declarations, discarding task groups.

Swift AnyObject, AnyClass, Any, and `any`

Swift has special types to work with nonspecific types, useful in certain scenarios because they provide a lot of flexibility in working with different types of data.

Mar 22, 2023#swift#types

A Comprehensive Comparison of Swift and Objective-C

Swift and Objective-C are two programming languages used for developing iOS, macOS, and watchOS applications. Objective-C has been the….