How not to use enums in Swift
May 18, 2019, 11:02 AM
In Swift, enums are powerful. So powerful in fact, that it’s easy to abuse them.
Here are some examples of enum abuse, and alternative approaches.
App themes When adding dark theme to your app, instead of a boolean flag, you may add...
Make UIControl More Swifty
Mar 9, 2019, 4:11 PM
In Objective-C, it is possible to set a property either by using dot notation (eg. foo.prop = bar) or by calling a setter (eg. [foo setProp: bar]).
In Swift, there’s only one way - the dot notation. If you needed custom behavior in...