16. Creating complication with ClockKitより
Complication Families
Modular small
Modular large
Utilitarian small
Utilitarian
17. Creating complication with ClockKitより
Complication Families
Modular small
Modular large
Utilitarian small
Utilitarian large
Utilitarian
18. Creating complication with ClockKitより
Complication Families
Modular small
Modular large
Utilitarian small
Utilitarian large
Circular small
Circular
20. CLKComplicationTemplate
class CLKComplicationTemplateModularLargeStandardBody {
var headerImageProvider: CLKImageProvider?
var headerTextProvider: CLKTextProvider
var body1TextProvider: CLKTextProvider
var body2TextProvider: CLKTextProvider?
}
CLKComplicationTemplate
11:00AM
Group D
Haight – Twin Peaks
Body 2 text
Body 1 text
Header image Header text
Creating complication with ClockKitより
29. • データソースのメソッドは最小限にとどめておくこと
The implementations of your data source methods should be minimal.
• 通信してデータを取ってくるとか計算とかデータの転送が遅れるようなことはしない
Do not use your data source methods to fetch data from the network, compute values, or do anything that might delay the delivery of that data.
• データの取得や計算が必要な場合はiOSアプリ側で行ったり、WatchKit extension
の別の場所で行い、それをcomplicationからアクセス可能な場所にキャッシュさせて
使用すること
If you need to fetch or compute the data for your complication, do it in your iOS app or in other parts of your WatchKit extension and cache the data in a place where your complication data source can access it.
• データソースのメソッドではキャッシュしたデータを取ってきて、ClockKitの要求す
るフォーマットに設定するだけにする
The only thing your data source methods should do is take the cached data and put it into the format that ClockKit requires
注意点