This section contains some short posts or annotated code snippets that albeit interesting or likely useful didn't warrant a complete blog article.
All these examples and posts are compatible with Swift 3.
|
#97: When to Use final in Swift |
#96: Dynamic Member Lookup in Swift |
|
#95: Key Paths in Swift |
#94: @autoclosure in Swift APIs |
|
#93: Sendable in Swift |
#92: nonisolated in Swift |
|
#91: Actors in Swift |
#90: Task Groups in Swift |
|
#89: async let in Swift |
#88: @MainActor in Swift |
|
#87: @available and Deprecation in Swift |
#86: @discardableResult in Swift |
|
#85: typealias for Readability in Swift |
#84: Nested Types in Swift |
|
#83: Custom Subscripts in Swift |
#82: Partial Ranges in Swift |
|
#81: Half-Open vs Closed Ranges in Swift |
#80: stride in Swift |
|
#79: zip with Swift Sequences |
#78: allSatisfy in Swift |
|
#77: reduce(into:) in Swift |
#76: compactMapValues for Dictionaries |
|
#75: map vs flatMap vs compactMap |
#74: Optional Chaining in Swift |
|
#73: try?, try! and do/catch in Swift |
#72: Custom Errors with LocalizedError |
|
#71: Result in Swift |
#70: some vs any in Swift |
|
#69: Protocol Extension Dispatch Gotchas |
#68: Default Implementations in Protocol Extensions |
|
#67: Constrained Extensions in Swift |
#66: where Clauses in Swift Generics |
|
#65: Conditional Conformance in Swift |
#64: Associated Types in Swift Protocols |
|
#63: Self in Protocols and Classes |
#62: Protocol Existentials with any in Swift |
|
#61: Opaque Return Types with some |
#60: Trailing Closures in Swift |
|
#59: Using unowned Safely in Swift |
#58: Using [weak self] in Swift Closures |
|
#57: Capturing Values in Swift Closures |
#56: Escaping Closures in Swift |
|
#55: inout Parameters in Swift |
#54: Why mutating Exists in Swift |
|
#53: Property Observers: willSet and didSet |
#52: Computed Properties with get and set |
|
#51: Lazy Stored Properties in Swift |
#50: defer in Swift |
|
#49: Pattern Matching with guard case in Swift |
#48: Pattern Matching with if case in Swift |
|
#47: Wait or Delay in Swift |
#46: Unexpectedly Found nil While Unwrapping an Optional |
|
#45: Get the Type of a Variable in Swift |
#44: Singletons without dispatch_once in Swift |
|
#43: Set Operations in Swift |
#42: Substrings in Swift 4 or Newer |
|
#41: Struct or Class in Swift? |
#40: String Length in Swift |
|
#39: String Characters by Index in Swift |
#38: Static vs Class Properties in Swift |
|
#37: Shuffle Arrays in Swift |
#36: Replace Character Occurrences in Swift 5 |
|
#35: The #pragma mark Equivalent in Swift |
#34: Optional Methods in Protocols |
|
#33: UserDefaults Subscripts in Swift |
#32: List All Enum Cases in Swift 5 |
|
#31: Join a String Array in Swift 4+ |
#30: Iteration with Index in Swift |
|
#29: Interesting Uses of @autoclosure |
#28: #if and Other #ifdef Replacements in Swift |
|
#27: Dispatch After in Swift 5 |
#26: Different Ways to Add Elements to an Array |
|
#25: Convert URL to String in Swift |
#24: Convert String to Int in Swift |
|
#23: Convert Int to String in Swift |
#22: Check if a String Contains Another String in Swift |
|
#21: Check if an Array Contains Elements in Swift |
#20: Calling Objective-C from Swift |
|
#19: Validate Email Addresses in Swift |
#18: Background Threads in Swift |
|
#17: Generate Random Numbers with Swift |
#16: Singletons in Swift 3 |
|
#15: Rounding Floating Point Numbers to Specific Decimal Places |
#14: NSTimer with Swift 3 |
|
#13: KVO and KVC in Swift 3 |
#12: Rounding Floating Point Numbers in Swift 3 |
|
#11: Print object's content with dump |
#10: Executing closures with a delay in Swift 3 |
|
#09: Creating DispatchQueues in Swift 3 |
#08: Merging Dictionaries in Swift |
|
#07: Labeled statements in Swift |
#06: URL/URI Escaping in Swift 3: Encoding and Decoding |
|
#05: Sorting Array and Dictionaries in Swift |
#04: Splitting Strings in Swift |
|
#03: String trimming in Swift 3 |
#02: CustomStringConvertible and Description in Swift |
|
#01: Swapping variables in Swift |