(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| /*** | |
| * Message Queue | |
| * Copyright © 2013 Matthew Tole | |
| * | |
| * Version 1.0.0 | |
| ***/ | |
| #include <pebble.h> | |
| #include "message-queue.h" |
| /*** | |
| * Font Loader | |
| * Copyright © 2013 Matthew Tole | |
| * | |
| * 1.0.0 | |
| ***/ | |
| #include <pebble.h> | |
| #include "font-loader.h" |
| /** | |
| Provides the ability to verify key paths at compile time. | |
| If "keyPath" does not exist, a compile-time error will be generated. | |
| Example: | |
| // Verifies "isFinished" exists on "operation". | |
| NSString *key = SQKeyPath(operation, isFinished); | |
| // Verifies "isFinished" exists on self. |
| /*** | |
| * Data Processor | |
| * Copyright © 2014 Matthew Tole | |
| ***/ | |
| #include <pebble.h> | |
| #include "data-processor.h" | |
| static char* data_start = NULL; | |
| static char* data_pos = NULL; |
| #include <pebble.h> | |
| #include "scroll-text-layer.h" | |
| #define MAX_HEIGHT 2000 | |
| #define PADDING_X 4 | |
| #define PADDING_Y 4 | |
| struct ScrollTextLayer { | |
| TextLayer* text_layer; | |
| ScrollLayer* scroll_layer; |
| // | |
| // GHReadWriteQueue.h | |
| // GitHub | |
| // | |
| // Created by Justin Spahr-Summers on 2014-03-24. | |
| // Copyright (c) 2014 GitHub. All rights reserved. | |
| // | |
| #import <Foundation/Foundation.h> |
| // | |
| // LTClientBrowser.h | |
| // LayerTreeServer | |
| // | |
| // Created by Indragie Karunaratne on 2014-05-21. | |
| // Copyright (c) 2014 Indragie Karunaratne. All rights reserved. | |
| // | |
| #import <Foundation/Foundation.h> | |
| #import <LayerTreeKit/LayerTreeKit.h> |
| struct Property<T> { | |
| let name: String | |
| let _getter: () -> T | |
| let _setter: T -> () | |
| var value: T { | |
| get { | |
| return _getter() | |
| } |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| #! /bin/sh | |
| # usage: <shellscript> [--osx] typename | |
| if [ "$1" = "--osx" ] ; then | |
| echo ":print_module $2" | xcrun swift -deprecated-integrated-repl | |
| else | |
| sdk_path=$(echo `xcrun --show-sdk-path` | sed 's#MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk#iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk#') | |
| echo ":print_module $1" | xcrun swift -deprecated-integrated-repl -sdk "$sdk_path" | |
| fi |