watchOS: Complications

Feb 7 2023 Swift 5.6, watchOS 8.5, Xcode 13

Part 2: Tinted & Custom Complications

11. Build a SwiftUI View for a Complication

Episode complete

Play next episode

About this episode
Leave a rating/review
See forum comments
Cinema mode Mark complete Download course materials
Previous episode: 10. Tint SwiftUI Complications Next episode: 12. Refactor SwiftUI Views

Get immediate access to this and 4,000+ other videos and books.

Take your career further with a Kodeco Pro subscription. With unlimited access to over 40+ books and 4,000+ professional videos in a single subscription, it's simply the best investment you can make in your development career.

Learn more Already a subscriber? Sign in.

This video Build a SwiftUI View for a Complication was last updated on Feb 7 2023

Heads up... You've reached locked video content where the transcript will be shown as obfuscated text.

For most complications, you’ll use the templates you learned about earlier in the course.

Showing an appointment

Open the CalendarComplication starter project.


I already performed the pieces related to EventKit to save you some time.

HStack {

HStack {
  RoundedRectangle(cornerRadius: 3)
  RoundedRectangle(cornerRadius: 3)
    .frame(width: 5)
    .frame(width: 5)
private let formatter: DateIntervalFormatter = {

  let formatter = DateIntervalFormatter()

  formatter.dateStyle = .none
  formatter.timeStyle = .short
  return formatter
// 3
// 1
VStack(alignment: .leading) { 

  Text(formatter.string(from: event.startDate, to: event.endDate))
  if let location = event.location {