More Related Content Similar to The Other WatchKit (20) The Other WatchKit8. I can haz SDK?
Local
$ brew install pebble-sdk
http://developer.getpebble.com/sdk/
Online
CloudPebble http://cloudpebble.net
9. Project Creation
$ pebble new-project --javascript NSLondon
$ tree NSLondon
.
├── appinfo.json
├── resources
├── src
│ ├── NSLondon.c
│ └── js
│ └── pebble-js-app.js
└── wscript
11. Project Anatomy
NSLondon.c
static void init(void) {
window = window_create();
window_stack_push(window, true);
}
static void deinit(void) {
window_destroy(window);
}
13. Components
• Window ≈ UIViewController
• WindowStack ≈ UINavigationController
• Layer ≈ UIView
14. Components
Window
As we saw before, window_create() and window_destroy()
are used for window creation and destruction.
You get access to the root layer with
window_get_root_layer().
25. Graphics
• Circles
• Rects
• Rounded rects
• Paths
• Fills & strokes
• Text drawing/sizing