🆒
I'm an iOS developer who's really into app architecture, testability, & getting the most out of Swift. Sidebar: why on EARTH don't gists count as contributions?
-
Potbelly
- Queen Creek, AZ
- http://www.jakehawken.com
Highlights
- Pro
Pinned Loading
-
ScreenStateHandler -- The glue to co...
ScreenStateHandler -- The glue to connect your views and presenters. 1import Foundation
23/*
4I love the presenter pattern, but I hate connecting the presenter to the view using
5delegation. Since protocol conformance can't be private in Swift, delegation always
-
@NonNil - crash with purpose!
@NonNil - crash with purpose! 1/// The NonNil property wrapper allows you to supply an error message at the declaration of a
2/// property, and then otherwise access it like it's non-nil in your code. Any access before it's
3/// set will still result in a crash the way explicity unwrapping would, but with the added benefi
4/// of there being an informative crash message. Intended to be a conscientious and thoughtful
5/// replacement for the `!` operator.
-
Testable Swift Playgrounds! Just dro...
Testable Swift Playgrounds! Just drop this in the Sources folder of a Swift Playground, and you'll be able to write XCTest-style tests right there in your code! 1/*
2Ever wanted to write unit tests in a Swift Playground? … No? Oh.
3I’m really the only person? Well ok, then never mind.
4If you change your mind though, you can drop this file directly
5into the Sources folder and be able to write XCTest-style code
-
@DiskBacked - Easy computed properti...
@DiskBacked - Easy computed properties backed by UserDefaults. 1/// This propety wrapper generates a variable that is backed by UserDefaults.
2/// This can be used with any Codable type, and saves the item to disk as Data.
3/// At initialization, you supply the key at which the the variable will be
4/// saved, and the instance of UserDefaults in which to save it.
5///
Something went wrong, please refresh the page to try again.
If the problem persists, check the GitHub status page or contact support.
If the problem persists, check the GitHub status page or contact support.