Gratuity Video 1 Gratuity Screenshot 1 Gratuity Screenshot 2 Gratuity Screenshot 3 Gratuity Screenshot 4

Overview

Gratuity was an app I made to learn how to use Swift as well as how to customize UIKit a lot. Even though it was only a simple tip calculator, I really focused on the design to make it something unique and easy to use. I focused on how the iPhone has a great touch screen that makes scrolling so easy. The same was true on the Apple Watch, where the digital crown makes scrolling just as easy. So yes, I managed to make a tip calculator that does not use keyboard or keypad input at all.

Download

Unfortunately, Gratuity is no longer available on the App Store, but you can download the source with the link below. That said, I am not sure how easy it will be to compile as Swift as well as the Watch Extension API’s have changed so much over the years.

Table of Contents

Development

The first app I wrote was before Swift was announced, so it was written in Objective-C. But with Gratuity I wanted to learn Swift. Needless to say, it was not the greatest Swift code. Also, it went through the extremely painful “Great Renaming” when Swift 2.0 came out. Also, I made heavy use of the custom UIViewController transition API. Its a big pain in the ass, but it can really create some beautiful effects. You really need to watch the demonstration video in order to see all of the custom effects I built into Gratuity. All of that combined meant that the codebase is not beautiful and is difficult to maintain. But that is often the tradeoffs developers need to make. On one hand, you can have beautiful and clean code with no frills and on the other, you have a big jumble of code that gives you the design you seek.

Lastly, at this time WatchKit was brand new and extremely limited. It was honestly a giant pain to work with and I ended up rewriting the watch UI twice as WatchKit 1.0 was so limiting, I could barely make the app work at all.

Watch App Version 1.1

In WatchKit 1.0, the only way to make a list scroll with the digital crown was to have the list be the only list on the screen. Thus if I had to make every step of the app a full screen. Also, the List view API did not do cell recycling as it did on the iPhone. So each list had to be extremely short or else the the screen would take forever to load. Considering the limitations, I think the results came out good, but I wanted more!

Watch v1.1 Video 1 Watch v1.1 Screenshot 1 Watch v1.1 Screenshot 2 Watch v1.1 Screenshot 3 Watch v1.1 Screenshot 4

Watch App Version 1.2

I am not entirely sure which WatchKit update allowed for the use of picker controls, but this is exactly the update I needed. With this new control, the watch app could be laid out like the iPhone app and work in the exact same way. This was so much better I was able to remove the tutorial I worked so hard on in v1.1.

Watch v1.2 Screenshot 1 Watch v1.2 Screenshot 2 Watch v1.2 Screenshot 3 Watch v1.2 Screenshot 4

Current Status

I unfortunately retired Gratuity several years ago. There were several reasons for this:

  1. It never got much usage: It was free, but that does not mean people will find and use your app
  2. It was difficult to maintain: Because of the WatchKit extension, it was difficult to maintain and test. Especially since the WatchKit API kept getting scrapped and rewritten by Apple.
  3. I moved to Japan: I no longer needed a tip calculator