Open Source
I’ve released a few libraries for iOS development as open source. They’re available under the MIT license on GitHub. I’ve also worked on the Home Assistant iOS and macOS app.
HAKit
Conveniently access the Home Assistant REST and WebSocket APIs. This library includes an Observable
-like caching system and an absurdly over-done 100% code coverage.
ZSWTappableLabel
A subclass of UILabel
powered by NSAttributedString
which allows tapping or long-pressing on certain parts of the string.
My goal for this project was to limit the scope of the subclass. No drawing is done by the label; UILabel
handles all of this. Unless the user is interacting with the label, no additional computation is done.
ZSWTaggedString
Converts NSString
into NSAttributedString
using an HTML-like markup language without requiring HTML semantics.
My major use case is making localizing strings significantly easier, but it’s useful even if localization isn’t a goal. This pairs well with ZSWTappableLabel
when there are links within the string.
ZSWSuffixTextView
A subclass of UITextView
which adds a placeholder and a suffix label appearing after the editable text.
This looks a lot like the social posting UI used in a lot of apps where the user types something and “– at The Little Chihuahua with Bob” appears afterwards.
ZSWHierarchicalResultsController
A replacement for NSFetchedResultsController
. Each parent object is assigned a section and its children are the objects within that section.
The use case for this was very niche in Heyday, but it’s an interesting exercise in reimplementing something fundamental to Core Data. With extensive testing, it highlights just how complicated it can be.