Category: Swift

Swift 3: UITableView snap to cells 0

Swift 3: UITableView snap to cells

If you have your UITableViews snap to their cells, you’ll end up with a more refined user experience. This solution I have works with cells that are consistent in their height (static). You could...

Swift 3: Distance between two CGPoints 0

Swift 3: Distance between two CGPoints

Here it is in Swift 3, it’s a little different. I tried to use hypotf but it didn’t like CGFloat subtraction.

 

Protocol/delegates in Swift 3.0 0

Protocol/delegates in Swift 3.0

I declare this day a fine day having discovered non-Objective-C protocols! No more @objc protocol usage. Now it’s as simple as something like this:

And then in implementation

This is a really...

Shaking a macOS Window 0

Shaking a macOS Window

There may come a time when you’d like to shake a macOS application’s window (or one of them) to reinforce an event. In my case, I am creating a macOS application that serves as...

WatchConnectivity gotcha. willActivate() 1

WatchConnectivity gotcha. willActivate()

This may seem simple for many who have been busy developing Watch extensions for the Apple Watch, but it stumped me for about a minute. Not long, but long enough for me to slap...

Swift: When you have an Optional String you need to remove 0

Swift: When you have an Optional String you need to remove

Recently I have been developing an iOS app that comes with a companion Apple Watch extension. I wanted to play with the communication between iOS and WatchOS using

via

It was working well...

Swift: Bose SoundTouch device discovery using Bonjour 0

Swift: Bose SoundTouch device discovery using Bonjour

Are you a developer wanting to use the Bose SoundTouch Developer APIs to create an experience that drives SoundTouch devices? Are you interested in implementing Bonjour discovery AND resolving IP Addresses without using Objective-C...