UIStackView Tricks: Proportional Custom UIViews with ‘Fill Proportionally’

In iOS 9, Apple introduced a very handy new UI concept: the UIStackView. Stack views help us quickly compose sequential “stacks” of views without Auto Layout. UIStackView offers a number of distribution and spacing options in Interface Builder. If you’re unfamiliar with UIStackView, I recommend reading “Exploring UIStackView Distribution Types” first.

In this post, I’ll describe how to use the Fill Proportionally option with any custom view while enjoying fine-grained control over the proportions themselves. Read more on UIStackView Tricks: Proportional Custom UIViews with ‘Fill Proportionally’…

Working with iOS Image Filters in Swift

I have always found image processing interesting and fun. However, despite having a decent amount of experience with it, I had never worked much with the tools for iOS. I decided to play around with them a bit, and to my delight, most of the iOS image processing libraries are incredibly simple to use. This topic has a lot of surface area, so I won’t be able to do it justice in a single post. However, this post should be enough to allow you to get started with image processing in iOS.
Read more on Working with iOS Image Filters in Swift…

Sharing Web Data with iOS Using WKWebView

I recently helped develop a native iOS app for a client that sells software to many different educational organizations. We wrote the app in Swift, and it interacts with our client’s pre-existing web API.

One challenge we faced was that many of our client’s customers require single-account, multiple-login (SAML) support through their own web portals. To support SAML, we needed an easy way to pass a user’s API credentials from a web page to our iOS application. In this post, I’ll show how this can be accomplished using WKWebView.
Read more on Sharing Web Data with iOS Using WKWebView…

Testing with Swift – Approaches & Useful Libraries

I’ve been working on developing an iOS app in Swift. It’s my first experience developing in pure Swift, without any Objective-C. This project has taught me a lot about the current state of testing in Swift, including different testing approaches and best practices. In this post, I’ll share some of my experiences and discuss how we have approached testing different types of Swift code. I’ll also talk about some useful testing libraries. Read more on Testing with Swift – Approaches & Useful Libraries…

Go Home Swift Compiler, You’re Drunk

Swift is approaching its two year anniversary. Thus far it has experienced high adoption and continues to grow as developers transition away from Objective-C. As a programming language, Swift is great. It feels productive to work in, and has a nice variety of modern language features.

Read more on Go Home Swift Compiler, You’re Drunk…

Interacting with iBeacons in Swift

I’ve recently been investigating iBeacons and the programming model to interact with them in iOS using Swift.

iBeacons are a class of Bluetooth Low Energy (BLE) devices that continuously broadcast identifying information about themselves using the iBeacon protocol that Apple introduced in 2013. They are meant to be placed in the physical world at locations of interest. Mobile apps can then ask to be notified when they move within range of a beacon, and react appropriately. Read more on Interacting with iBeacons in Swift…

Working with Objective-C and Swift on the Same Project

I know I’m a little late to the game, but I just recently started playing around with Swift, Apple’s new flagship language for developing apps for iOS, OS X and Apple Watch. Rather than starting a completely new project using only Swift, I thought it would be an interesting challenge to start with some Objective-C and try converting a class or two to Swift. Having heard that it’s possible to mix the two languages within a single project, I set out to see how difficult that would be. Here are a few things I learned throughout the process. Read more on Working with Objective-C and Swift on the Same Project…