Reading notes of a rubymotion book
Use NSLog instead of puts
Because puts wouldn’t output to device logs
RubyMotion provide help for 3 things
- flexible workflow(editor, command line, repl)
- use ruby language
- skip the large set of new API have to learn
Value Object
There are 4 value object classes 1. NSString 1. NSNumber 1. NSDate 1. NSData( for byte buffers)
Major design patterns in iOS development
- MVC(the main difference from rails is that working with user interactions and system events instead of HTTP requests)
- Delegation
- Protocols
- Notification Center(Pub/Sub)
- Target-Action
- Key-Value Observing(more Observers)
- View Hierarchy
- responder Chain
- Receptionist
MVC pattern
- difference between iOS and Rails The main changes to controller and view layers in relation to events
- models are not alwasy database based
- view objects are inherit from UIView or NSView, and responsible for drawing theirselves and subviews. In the case of controls, handling user interaction and input, then tell the controller about it.