84 cards across 4 sections
ARC
async
await
Sendable
6.3
@c
Module::name
6.3.3
6.4
if let value = optional
guard let ... else
??
name ?? "Guest"
?.
!
String!
@IBOutlet
struct
class
case
case success(User)
enum Direction: String
rawValue
Array
Dictionary
self
mutating
===
==
Equatable
: ProtocolName
extension ProtocolName { }
A & B
associatedtype Element
Collection
any Shape
Shape
some Shape
func identity<T>(_ x: T) -> T
T
struct Stack<Element>
<T: Comparable>
where
subscript<T>(key: T) -> Value?
@escaping
[weak self]
[unowned self]
deinit
weak
unowned
func fetch() throws -> Data
try
try?
try!
do { try risky() } catch { }
catch
nil
Result<Success, Failure>
defer { }
@propertyWrapper
wrappedValue
projectedValue
$
$text
@State
text
@resultBuilder
buildBlock
@ViewBuilder
Task { }
withTaskGroup
actor
@MainActor
Package.swift
swift build
swift test
guard let user = fetchUser() else { return}
task = Task { [weak self] in guard let self else { return } self.reload()}
extension Greetable { func greet() -> String { "Hi, \(name)" }}
struct Point { var x: Double var y: Double}
@MainActorfinal class ViewModel { var title = ""}
@propertyWrapperstruct Clamped { var wrappedValue: Int}
await withTaskGroup(of: Int.self) { group in group.addTask { await fetch() }}
enum State { case loading case ready(Data) case error(String)}
func fetch( _ done: @escaping (Result<Data, Error>) -> Void)
func makeShape() -> some Shape { Circle()}
struct Config: Sendable { let timeout: Int}
func read() throws { let f = try open() defer { f.close() }}
.package( url: "https://github.com/x/y", from: "1.0.0")
func first<C: Collection>(_ c: C) -> C.Element? where C.Element: Equatable
async let a = fetchA()async let b = fetchB()let result = await (a, b)
if let
guard let
Task
async let
withCheckedContinuation
<T: Shape>
didSet
willSet
do
@unchecked Sendable
TaskGroup
<T: Protocol>
some Protocol
Error