Playing With WatchKit
22 Mar 2015While v1.0.0 of “Count The Days Left” is waiting for review, I thought I’d have a play with getting a Apple Watch extension written for the app.
Simple is Good
Now as you probably know, the first version of WatchKit is very limited on what you can do in the UI. There are just a few standard controls, no way of writing your own, and any animation can only be done using image sets that are shown one after the other.
However the upside of this is it’s pretty quick to get up and running, and I’ve got something reasonable working after just an hour or so’s work.
Useful Links
Now there are lots of really good starter tutorials out there on getting up and running, so I’m not going to go into too much detail here, but here are a couple of articles I found particularly useful:
- WatchKit Tutorial with Swift - a good starting point from Greg Heo
- WatchKit: Let’s Animate from the ever useful Natasha The Robot
The thing that I thought was going to take the most time was generating the collection of images I needed for the animation of the progress circle. Fortunately I found a link to this Radial/Ring/Circle Progress Chart Generator for Apple WatchKit on GitHub which did exactly what I wanted!
Here’s a screenshot from the Watch Simulator with what the app looks like right now:
I haven’t found a way of capturing the animation to show here as the progress circle moves into position, but on the simulator at least it works pretty well.
Next steps
Well I think I’m just about done!
I’ll probably write a summary article wrapping everything up once the app is safely released in the App Store.
Previous posts in the series
- Plan for DaysLeft App
- Baby Steps using Swift
- Porting UserSettings Code To Swift
- Basic UI in Swift
- Writing a Today Widget in Swift
- Adding a Custom Control
- Swift and Build Odds and Sods
- Animating Progress
- Counting Weekdays Between Two Dates
- Getting ready to Ship Swift
- Waiting For Review
The code for the project is also available on GitHub