Swift Tip – Accessing a User’s Documents Directory with URL Extension

When you need to access the documents directory on a user’s device, what do you do? In the past, I know I’ve gotten used to typing out the same set of code over and over throughout my apps. I know, I know – DRY – don’t repeat yourself. One way to simplify this is to […]

The 5 W’s of Swift Extensions

For newcomers to Swift, the concept of extending a Type may be new, so I thought I’d share a high-level overview of Swift extensions in the style of asking the 5 W’s: Who? What? When? Where? Why? Who “Swift developers” is a pretty obvious answer, but here are a scenarios to ask yourself about to […]

Slide In Animation in Swift

In a previous post about fade animations in Swift, I demonstrated how to use a class extension to add the ability for any UIView instance to easily call fadeIn() or fadeOut() on itself. This strategy was nice – the animations, while simple, would have cluttered my code each time I used them, had I not […]

Fade In / Out Animations as Class Extensions in Swift

Updated on December 6, 2016 – Xcode 8 & Swift 3.0 The question has been asked (and solved) on StackOverflow in Objective-C, but my aim in this post is to take the Objective-C implementation and leverage Swift extensions to make this job even easier to achieve and reuse. Jump to… Fading without an extension Refactoring […]