Tagged
swift
Snippet
Dealing with file extensions and Uniform Type Identifiers
1 minute read
Storing OSLog instances as an extension in order to provide them using a shorthand syntax.
Snippet
Map the keys of a dictionary to a different type
1 minute read
Transforming the type of keys in a dictionary using a handy map function.
Snippet
Create time intervals with explicit units
1 minute read
Extending TimeInterval in Swift can make clearer and more readable code.
Article
A modular analytics layer in Swift
7 minute read
Ensuring your analytics implementation is easy to use, alter and extend can be difficult. Let's have a look at a possible solution by building a modular analytics layer together in Swift.
Snippet
Protocol functions with default parameter values
1 minute read
Swift protocols can have functions with default parameter values through the use of extensions.
Snippet
Access the call site of a function using special Swift literals
1 minute read
Easily obtain information of where a Swift function was called from for use within the function itself.
Snippet
Safely index items within a collection
1 minute read
How to use a Swift extension subscript and use it to safely get an item by index.