-
-
Save andrew-codechimp/3d94c6516085452dcd67ed24efebc36f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| func getLocalizableSampleTemplate(for complication: CLKComplication, withHandler handler: @escaping (CLKComplicationTemplate?) -> Void) { | |
| let simpleTextProvider1 = CLKSimpleTextProvider( | |
| text: "Publication") | |
| let simpleTextProvider2 = CLKSimpleTextProvider( | |
| text: "Latest Headline") | |
| switch (complication.family) { | |
| case (.graphicRectangular): | |
| handler(CLKComplicationTemplateGraphicRectangularStandardBody( | |
| headerTextProvider: simpleTextProvider1, | |
| body1TextProvider: simpleTextProvider2)) | |
| case (_): | |
| handler(nil) | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment