Caution
JavaScript is disabled in your browser.
This site uses JavaScript for features such as search.
For the best experience, please enable JavaScript before browsing this site.
Dictionary
- Home
- Swift Dictionary
Swift Dictionary Index
| [Setup] Swift Development Environment | Steps to set up an environment for installing and running Swift. |
| let / var / Type Inference | Declaring constants and variables with type inference. |
| Tuple / Named Tuple | Grouping multiple values together. |
| String.count / isEmpty / String Literals | Basic string operations. |
| String.uppercased() / lowercased() / capitalized | Converting between uppercase and lowercase. |
| String.hasPrefix() / hasSuffix() / contains() | String determination and checking. |
| String.replacingOccurrences() / trimmingCharacters() | Replacing and trimming strings. |
| String.split() / joined() / String Index | Splitting, joining, and index operations on strings. |
| Array.append() / insert() / remove() | Adding, inserting, and removing array elements. |
| Array.contains() / firstIndex() / lastIndex() | Searching and checking within an array. |
| Array.filter() / sorted() / sort() | Filtering and sorting an array. |
| Array.map() / compactMap() / flatMap() | Transforming array elements. |
| Array.reduce() / forEach() / enumerated() | Aggregating and enumerating an array. |
| Array.prefix() / suffix() / dropFirst() / dropLast() | Slicing and concatenating arrays. |
| Dictionary Basics / .keys / .values | Declaring and accessing a dictionary. |
| Dictionary.updateValue() / Removing Entries / mapValues() | Updating, deleting, and transforming a dictionary. |
| Set.insert() / remove() / contains() | Basic set operations. |
| Set.union() / intersection() / subtracting() | Set operations such as union and intersection. |
| switch / case / where / fallthrough | Conditional branching with pattern matching. |
| for-in / while / repeat-while | Basic loop constructs. |
| break / continue / return / labeled statement | Controlling loops and functions. |
| guard / guard let / guard var | Conditional checking with early return. |
| func / Argument Labels / Default Parameters | Defining functions and rules for arguments. |
| inout / Return Types / Multiple Return Values | Advanced use of inout parameters and return values. |
| Closures (Basics) / { } / in | Basic closure syntax. |
| Trailing Closures / Shorthand / $0 | Writing closures concisely using trailing closure syntax. |
| @escaping / @autoclosure / Capture List | Advanced topics on closures. |
| Optional / ? / ! | Basics of Optional (safely handling nil). |
| if let / guard let (Optional Binding) | Safely unwrapping an Optional. |
| Optional Chaining / map / flatMap (Optional) | Calling methods and transforming Optional values. |
| ?? (Nil-Coalescing Operator) | Returning a default value when nil is encountered. |
| Type Casting — as / as? / as! / is | Checking and converting types. |
| enum Basics / case / switch | Defining and using enumerations. |
| enum RawValue (Int / String) | Enumerations with raw values. |
| enum Associated Values | Enumerations with associated values. |
| enum Methods / Properties / mutating | Adding methods to an enumeration. |
| struct Basics / Memberwise Initializer | Defining structs and characteristics of value types. |
| class Basics / init() / deinit() | Defining classes and characteristics of reference types. |
| Inheritance / override / final / super | Class inheritance and method overriding. |
| Stored Properties / Computed Properties / lazy | Types of properties and how to use them. |
| Failable Initializer / required init | Special initializers. |
| typealias / Type Alias | Giving a type an alias. |
| protocol Basics / Conformance | Defining and adopting protocols. |
| Protocol Default Implementations / Protocol Composition | Advanced use of protocols. |
| extension Basics / Adding Methods | Extending existing types. |
| extension + protocol / Default Implementations | Conforming to a protocol using an extension. |
| Codable / Encodable / Decodable | JSON encoding and decoding. |
| Comparable / Hashable / Equatable | Using standard protocols. |
| Generic Functions / Type Parameters | Writing generic functions independent of specific types. |
| Generic Types / where Clause | Generic structs, classes, and enums. |
| some / any / opaque type | Type abstraction syntax in Swift 5.7+. |
| Error / Defining Errors with enum | Defining custom errors. |
| throws / try / do-catch | Throwing and catching errors. |
| Result<Success, Failure> | Treating success and failure as values. |
| ARC / Strong References / Retain Cycles | How ARC works and patterns that cause retain cycles. |
| weak / unowned | Preventing retain cycles with weak and unowned references. |
| async / await Basics | Defining and calling asynchronous functions. |
| Task / TaskGroup / async let | Managing tasks and running them in parallel. |
| Actor / Preventing Data Races | Data protection with actors and usage of @MainActor. |
| Date / DateFormatter / Calendar | Manipulating dates and times. |
| URL / URLComponents / URLSession | Building URLs and making HTTP requests. |
| JSONDecoder / JSONEncoder | JSON decoding and encoding. |
| FileManager | File and directory operations. |
| UserDefaults | Persisting app settings and small data. |
| NotificationCenter | Event notification between objects. |
| Timer | Timer processing. |