UITextField Form with Previous/Next Keyboard Accessory Input View as Extension (iOS/Swift)

UPDATED: Now use a scrollview instead of moving the view around. See the bottom of this post. Here’s how to easily, quickly create a manager for a form of UITextFields including Previous/Next buttons on a toolbar above the keyboard. It uses an extension on the UIViewController so it’s non-intrusive. All you have to do is Read more about UITextField Form with Previous/Next Keyboard Accessory Input View as Extension (iOS/Swift)[…]

Displaying an alert from an Extension

Display Alert Controller Popup from any UIViewController (iOS/Swift) Extension

Many apps use the UIAlertController to display information the user for them to acknowledge with an “OK” button. A UIViewController needs to present the alert controller to the user so I wrote an extension on UIViewController to handle this. This is just a simple alert to the user with an “OK” button that dismisses the Read more about Display Alert Controller Popup from any UIViewController (iOS/Swift) Extension[…]

Loading screen for iOS in Swift

Display a Loading/Waiting Activity Indicator (iOS/Swift)

Oftentimes, you need to display an activity indicator to the user when fetching or loading data.   It’s best to keep this in one place for ease of use. Also, it’s best to make sure this is done on the main/UI thread.   Loading Screen in Swift     Here’s a way to do it Read more about Display a Loading/Waiting Activity Indicator (iOS/Swift)[…]

map view uiviewcontroller extension

Swift: Handle Location and MapView Updates with Extension on UIViewController

As I mentioned in another extension post, I dig them…when they make sense. I tend to do simple map stuff a good bit and wanted to write an extension for it. Swift: Handle Location and MapView Updates with Extension on UIViewController What it does: Requests authorization for user location Centers the map on the user Read more about Swift: Handle Location and MapView Updates with Extension on UIViewController[…]

extension to compose email swift

Swift: Compose Email (MFMailComposeViewController) as an Extension to UIViewController

UPDATED for Swift 4… I’m a fan of extensions – but hopefully only when it makes sense. I wanted to write an extension on UIViewController to allow me to send email from any subclass…         Swift: Compose Email (MFMailComposeViewController) as an Extension to UIViewController Steps… Add a new file (⌘-N) and select Read more about Swift: Compose Email (MFMailComposeViewController) as an Extension to UIViewController[…]