Distinguishing Between Multiple UIActionSheets with Swift

The challenge when dealing with the presentation and handling of more than one UIActionSheet in a single View Controller is made clear by asking, “How am I going to tell which action sheet I’m dealing with so that I can handle the user’s choice appropriately?” Presumably, the user’s interaction with one of the action sheets […]

Replace Magic Strings with Enumerations in Swift

“What can I do to avoid these ‘magic strings’ in my code?” – This was the question I asked myself recently as I found myself in prepareForSegue comparing  segue.segueIdentifier to in-line hard-coded Strings.  This kind of in-line hard-coding of a String for comparison purposes is what I mean by “magic strings” in this article.  I knew this felt like a bad […]