Complications are bits of watchOS application that can be put on the user's watch face and offer quick information, simply by looking at his/her Apple Watch, without opening the accompanying watchOS/iOS app. The Apple Watch ships with some default complications: Calendar, Weather, Activity, Battery (it shows only the watch’s battery level), etc.
There are 5 complication families. This article will show how to make 7 types of complications, from each complication family. 2 of the shown complications are only available in watchOS 5, and only on the Apple Watch Series 4 and up.
Recently, I had the chance to play with watchOS complications. This led me on a learning path.
There is a goodie at the end of the article :)
Before starting, I would like to point out a series of links that turned out to be useful on the subject of watchOS complications:
The center text is the text that will be in the "middle" of the ring.
The leading text will be in the bottom left of the ring, while the trailing text will be in the bottom right.
The gauge can be either filled-style or ring-style. In the above example, the ring-style is chosen. Depending on the start date and the end date provided, it will have a small circle that will move along the gauge.
The gaugeColors parameters has to be given an array of colors. If you provide gaugeColorLocations with a nil value, watchOS will place the colors in an even out manner.
let utilitarianSmall =CLKComplicationTemplateUtilitarianSmallRingText()
This complication is very similar to set up like the Circular Small one.
The examples show how to make a complication for only 7 out of the 11 types of complications.
Keep in mind that each complication has other possibilities to show the information — instead of a closed/open ring, one could only show text or only an image.
At the end
We gather all the complications available in one cheat sheet to make it easier to have an overview over the many complications that Apple has to offer.
You can find the name of the complication and links to Apple's documentation.
You can get the cheat sheet here
Asynchronous programming is a technique used to perform long-running tasks without blocking the main thread of an application. This is important in Android, where the main thread is responsible for rendering the user interface and handling user input. Tra...
GitHub Actions can be used to automate almost any type of project, but in this article, I will cover how can we automate deployment (CI/CD) for WordPress. I personally chose WordPress as an example as is the world’s most popular CMS, with over 455 million...