Last active
April 27, 2018 20:11
-
-
Save pedroortizordep/de7ff3bcd4e010d634f0bfdd1361018b to your computer and use it in GitHub Desktop.
This file contains 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 createTimeLineEntry(headerText: String, bodyText: String, date: Date) -> CLKComplicationTimelineEntry { | |
let template = CLKComplicationTemplateModularLargeStandardBody() | |
let swift = UIImage(named: "swift") | |
template.headerImageProvider = | |
CLKImageProvider(onePieceImage: swift!) | |
template.headerTextProvider = CLKSimpleTextProvider(text: headerText) | |
template.body1TextProvider = CLKSimpleTextProvider(text: bodyText) | |
let entry = CLKComplicationTimelineEntry(date: date, | |
complicationTemplate: template) | |
return(entry) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment