Generating random numbers in Swift
A guide to generating random numbers and values in Swift using the native APIs introduced in Swift 4.2, covering basic generation, collections, and custom types.
Tibor Bödecs — Swift developer and technical writer sharing in-depth articles on Swift, Swift 6, server-side Swift, and frameworks like Hummingbird and Vapor, with a focus on clean architecture, type safety, and modern language features.
142 articles from this blog
A guide to generating random numbers and values in Swift using the native APIs introduced in Swift 4.2, covering basic generation, collections, and custom types.
A tutorial explaining the Adapter design pattern in Swift with a practical example of wrapping an EKEvent object.
A tutorial explaining the Dependency Injection design pattern in Swift, covering its basics, variations, and implementation for writing loosely coupled code.
A comprehensive tutorial on using Grand Central Dispatch (GCD) for multi-threading and concurrency in Swift programming.
A tutorial explaining the Swift delegate design pattern, including protocol definition, implementation, and memory management with weak references.
A Swift tutorial on creating a UICollectionView and its custom cell programmatically without using Interface Builder.
A tutorial on using iOS Auto Layout anchors programmatically in Swift, covering best practices for creating constraints without Interface Builder.
A tutorial on implementing the Command design pattern in Swift, with a practical example of a command-line argument handler.
A tutorial explaining the Prototype design pattern in Swift, demonstrating how to create and configure object clones with practical code examples.
A comparison of static, simple, factory method, and abstract factory design patterns using Swift code examples.
A tutorial explaining the abstract factory design pattern in Swift, including code examples for creating families of related objects.
Explains the Swift factory method design pattern with code examples, showing how to decouple object creation logic using protocols and classes.
A tutorial on implementing the simple factory design pattern in Swift to encapsulate object creation, using examples like color and environment factories.
Explains the static factory design pattern in Swift, covering named constructors, caching, and initialization scoping with practical code examples.
A tutorial on implementing the Builder design pattern in Swift to simplify the creation of complex objects like emitters, themes, and URLs.
Explains the Swift singleton design pattern, its criticisms as an anti-pattern due to global state, and proper use cases in iOS development.
A Swift tutorial on setting up iCloud Drive for iOS apps, covering project configuration, entitlements, and file management.
A guide to UIColor best practices in Swift, covering color models, conversions, and practical code examples for iOS development.
A tutorial on implementing custom view controller transitions and interactive swipe gestures in iOS using Swift and UIKit.
A comprehensive guide to using UICollectionView in iOS with Swift, covering setup, data sources, delegates, and building a music catalog UI.