Close Menu
  • Home
  • AI
  • Big Data
  • Cloud Computing
  • iOS Development
  • IoT
  • IT/ Cybersecurity
  • Tech
    • Nanotechnology
    • Green Technology
    • Apple
    • Software Development
    • Software Engineering

Subscribe to Updates

Get the latest technology news from Bigteetechhub about IT, Cybersecurity and Big Data.

    What's Hot

    When hard work pays off

    October 14, 2025

    “Bunker Mentality” in AI: Are We There Yet?

    October 14, 2025

    Israel Hamas deal: The hostage, ceasefire, and peace agreement could have a grim lesson for future wars.

    October 14, 2025
    Facebook X (Twitter) Instagram
    Facebook X (Twitter) Instagram
    Big Tee Tech Hub
    • Home
    • AI
    • Big Data
    • Cloud Computing
    • iOS Development
    • IoT
    • IT/ Cybersecurity
    • Tech
      • Nanotechnology
      • Green Technology
      • Apple
      • Software Development
      • Software Engineering
    Big Tee Tech Hub
    Home»iOS Development»ClockKit complications cheatsheet – The.Swift.Dev.
    iOS Development

    ClockKit complications cheatsheet – The.Swift.Dev.

    big tee tech hubBy big tee tech hubJuly 26, 20250643 Mins Read
    Share Facebook Twitter Pinterest Copy Link LinkedIn Tumblr Email Telegram WhatsApp
    Follow Us
    Google News Flipboard
    ClockKit complications cheatsheet – The.Swift.Dev.
    Share
    Facebook Twitter LinkedIn Pinterest Email Copy Link


    4/28/16 2:20 PM
    · 1 min read


    ClockKit families and templates, there are so many of them. It’s a little bit time consuming if you are looking for the right one.

    The official ClockKit documentation on Apple’s site is well written, but it lacks a generic overview of all the existing complications. I’ve created a little cheatsheet for you to simplify the searching process for the right complication style.

    This cheatsheet supports watchOS 5. In order to get the template name you just have to add up the names in the proper order. Usually left to right, top to bottom. Don’t worry you’ll get it. 😅

    Swift sample code is below the cheatsheet, please scroll! 👇

    ClockKit complications cheatsheet – The.Swift.Dev.

    Feel free to right click and download the cheatsheet image.

    ClockKit code sample in Swift
    This little snippet contains all the ClockKit complication families and templates. 😎

    import ClockKit
    
    class ComplicationDataSource: NSObject, CLKComplicationDataSource {
    
        func getSupportedTimeTravelDirections(
            for complication: CLKComplication,
            withHandler handler: @escaping (CLKComplicationTimeTravelDirections
        ) -> Void) {
            handler([.forward, .backward])
        }
    
        func getCurrentTimelineEntry(
            for complication: CLKComplication,
            withHandler handler: @escaping (CLKComplicationTimelineEntry?) -> Void
        ) {
            let date = Date()
            var template: CLKComplicationTemplate!
    
            switch complication.family {
            case .circularSmall:
                template = CLKComplicationTemplateCircularSmallStackText()
                template = CLKComplicationTemplateCircularSmallStackImage()
    
                template = CLKComplicationTemplateCircularSmallSimpleText()
                template = CLKComplicationTemplateCircularSmallSimpleImage()
    
                template = CLKComplicationTemplateCircularSmallRingText()
                template = CLKComplicationTemplateCircularSmallRingImage()
    
                break;
            case .extraLarge:
                template = CLKComplicationTemplateExtraLargeStackText()
                template = CLKComplicationTemplateExtraLargeStackImage()
    
                template = CLKComplicationTemplateExtraLargeSimpleText()
                template = CLKComplicationTemplateExtraLargeSimpleImage()
    
                template = CLKComplicationTemplateExtraLargeRingText()
                template = CLKComplicationTemplateExtraLargeRingImage()
    
                template = CLKComplicationTemplateExtraLargeColumnsText()
                break;
            case .modularSmall:
                template = CLKComplicationTemplateModularSmallStackText()
                template = CLKComplicationTemplateModularSmallStackImage()
    
                template = CLKComplicationTemplateModularSmallSimpleText()
                template = CLKComplicationTemplateModularSmallSimpleImage()
    
                template = CLKComplicationTemplateModularSmallRingText()
                template = CLKComplicationTemplateModularSmallRingImage()
    
                template = CLKComplicationTemplateModularSmallColumnsText()
                break;
            case .modularLarge:
                template = CLKComplicationTemplateModularLargeTable()
                template = CLKComplicationTemplateModularLargeColumns()
                template = CLKComplicationTemplateModularLargeTallBody()
                template = CLKComplicationTemplateModularLargeStandardBody()
                break;
            case .utilitarianSmall:
                template = CLKComplicationTemplateUtilitarianSmallFlat()
                template = CLKComplicationTemplateUtilitarianSmallSquare()
                template = CLKComplicationTemplateUtilitarianSmallRingText()
                template = CLKComplicationTemplateUtilitarianSmallRingImage()
                break;
            case .utilitarianSmallFlat:
                template = CLKComplicationTemplateUtilitarianSmallFlat()
            case .utilitarianLarge:
                template = CLKComplicationTemplateUtilitarianLargeFlat()
                break;
            case .graphicCorner:
                template = CLKComplicationTemplateGraphicCornerCircularImage()
                template = CLKComplicationTemplateGraphicCornerGaugeText()
                template = CLKComplicationTemplateGraphicCornerGaugeImage()
                template = CLKComplicationTemplateGraphicCornerStackText()
                template = CLKComplicationTemplateGraphicCornerTextImage()
                break;
            case .graphicCircular:
                template = CLKComplicationTemplateGraphicCircularImage()
                template = CLKComplicationTemplateGraphicCircularOpenGaugeImage()
                template = CLKComplicationTemplateGraphicCircularOpenGaugeRangeText()
                template = CLKComplicationTemplateGraphicCircularOpenGaugeSimpleText()
                template = CLKComplicationTemplateGraphicCircularClosedGaugeText()
                template = CLKComplicationTemplateGraphicCircularClosedGaugeImage()
                break;
            case .graphicBezel:
                template = CLKComplicationTemplateGraphicBezelCircularText()
                break;
            case .graphicRectangular:
                template = CLKComplicationTemplateGraphicRectangularLargeImage()
                template = CLKComplicationTemplateGraphicRectangularStandardBody()
                template = CLKComplicationTemplateGraphicRectangularTextGauge()
                break;
            }
            let entry = CLKComplicationTimelineEntry(
                date: date,
                complicationTemplate: template
            )
            handler(entry)
        }
    }
    

    That’s it for now. Time is over. ⏰


    Tibor Bödecs

    Share this article

    Thank you. 🙏

    Related posts

    Tibor Bödecs

    4/28/16 2:20 PM
    · 1 min read


    ClockKit families and templates, there are so many of them. It’s a little bit time consuming if you are looking for the right one.

    Tibor Bödecs

    2/27/18 3:20 PM
    · 3 min read


    Learn how to use Bonjour, with UDP/TCP sockets, streams and how to communicate through CoreBluetooth or the watch APIs.



    Source link

    cheatsheet ClockKit complications The.Swift.Dev
    Follow on Google News Follow on Flipboard
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email Copy Link
    tonirufai
    big tee tech hub
    • Website

    Related Posts

    ios – Differences in builds between Xcode 16.4 and Xcode 26

    October 13, 2025

    ios – Apple mapkit route function dose not works in China

    October 12, 2025

    swift – Does UIDevice.current.identifierForVendor change after iCloud backup and restore on another iOS device?

    October 11, 2025
    Add A Comment
    Leave A Reply Cancel Reply

    Editors Picks

    When hard work pays off

    October 14, 2025

    “Bunker Mentality” in AI: Are We There Yet?

    October 14, 2025

    Israel Hamas deal: The hostage, ceasefire, and peace agreement could have a grim lesson for future wars.

    October 14, 2025

    Astaroth: Banking Trojan Abusing GitHub for Resilience

    October 13, 2025
    Advertisement
    About Us
    About Us

    Welcome To big tee tech hub. Big tee tech hub is a Professional seo tools Platform. Here we will provide you only interesting content, which you will like very much. We’re dedicated to providing you the best of seo tools, with a focus on dependability and tools. We’re working to turn our passion for seo tools into a booming online website. We hope you enjoy our seo tools as much as we enjoy offering them to you.

    Don't Miss!

    When hard work pays off

    October 14, 2025

    “Bunker Mentality” in AI: Are We There Yet?

    October 14, 2025

    Subscribe to Updates

    Get the latest technology news from Bigteetechhub about IT, Cybersecurity and Big Data.

      • About Us
      • Contact Us
      • Disclaimer
      • Privacy Policy
      • Terms and Conditions
      © 2025 bigteetechhub.All Right Reserved

      Type above and press Enter to search. Press Esc to cancel.