Let's Build Activity++!
In this series Ben tries to replicate the UI behind Activity++, a popular fitness app. We learn how to draw activity rings with Core Graphics, how to customize UICollectionView to get the layout we desire, and how to integrate with HealthKit in order to access the data. We also talk to the creator of Activity++ himself, _David Smith, about how he actually implemented the app's user interface.
Length: about 2 hours.
Let‘s attempt to recreate Activity++, an application by _David Smith. The app features a number of interesting interface elements that would be interesting to try to build ourselves! In this part we'll start out by replicating the ring views for a given day.
Continuing in our quest to create the interface behind Activity++, this time we introduce a randomize button, proper theme colors, labels for the rings, and highlighting when the goal for each ring has been met.
This week we take our ring views and use them to create a collection view of rings, one for each day in an entire year.
In this episode we examine the scrolling performance of our activity ring views. We see that framerate suffers when scrolling quickly, then apply a few changes to bring scrolling performance back to 60 frames per second.
Continuing our series on building out our Activity++ clone, this time we hook up our application to HealthKit, displaying real data in the app from a device. We continue to use our wrapper type so that the application can still work in the simulator with randomized data, which also allows us to set up certain scenarios that we wish to test, such as streaks.
In this episode we allow for generating health data for use in the iOS simulator, where HealthKit data will not be available. We then create some known streaks to make the streak detection and UI decoration easier to test. We end the episode by setting up Quick and Nimble that we will use to test our streak generation algorithm.
We build our activity streak detection algorithm, testing it along the way with Quick and Nimble.