NSScreencast Episode #139 Today Extensions in iOS 8
Today Extensions in iOS 8 - NSScreencast
Today Extensionの実装
- iOS8 Today Extension
- XCode
- Today Extension
- product name
- language swift
- files
- Controller
- MainInterface.storyboard
- Today Extension
- Objects -> Control drag to source code
- Stepper -> IBAction
- numberLabel -> IBOutlet
- Share code between main app and extension
- Create CoffeeTracker class
- Drag 'Object' on tree of storyboard
- Set class name
- Reference to view and view controller
- IBOutlet
@objc class CoffeeTracker : NSObject
- Back to extension
- Drag 'Object' on storyboard tree
- Reference to label and stepper
- Remove extra relations
- Custom Class
- Class & Module
- build separately from main app
- Store data
- CoreData
- NSUserDefaults
- できないこともまだ多いらしい