#swift

Found 88 articles tagged with #swift

Swift Protocols

In Swift, a protocol defines a blueprint of methods or properties that can then be adopted by classes or any other types.

Sep 02, 2022#swift

Swift Result Builders

A result builder is a type that builds a nested data structure step by step. You use result builders to implement a domain-specific language (DSL) for creating nested data structures in a natural, declarative way.

Sep 02, 2022#swift

Swift Subscripts

Subscripts can take any number of input parameters, and these input parameters can be of any type. Subscripts can also return a value of any type.

Sep 02, 2022#swift

What are actors in Swift

An actor is a reference type that protects access to its mutable state, and is introduced with the keyword `actor`.

Jul 30, 2022#swift#swift-5.5

What's New in Swift 5.7

Swift 5.7, included in Xcode 14 Beta, introduces a whole spectrum of changes, from smaller syntax improvements to larger generics and concurrency updates.

Swift Global Actors

Global actors make it possible to safely work with global variables in a concurrent program, as well as modeling other global program constraints.

Swift `if let` Shorthand

Shorthand syntax for optional binding conditions that shadow an existing variable by omitting the right-hand expression.

Jul 26, 2022#swift#swift-5.7

iOS Operation Queues

One way to perform operations concurrently in iOS is with the Operation and OperationQueue classes built on top of GCD.

Common Swift Attributes

You specify an attribute by writing the @ symbol followed by the attribute’s name and any arguments that the attribute accepts.

Jul 19, 2022#swift#attributes

Protocol-Oriented Programming in Swift

Swift protocols play a leading role in the structure of standard library and a common method of abstraction, provide a similar experience to interfaces that some other languages have.

Jul 19, 2022#paradigms#swift