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

  1. flexible workflow(editor, command line, repl)
  2. use ruby language
  3. 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

  1. MVC(the main difference from rails is that working with user interactions and system events instead of HTTP requests)
  2. Delegation
  3. Protocols
  4. Notification Center(Pub/Sub)
  5. Target-Action
  6. Key-Value Observing(more Observers)
  7. View Hierarchy
  8. responder Chain
  9. Receptionist

MVC pattern

  1. difference between iOS and Rails The main changes to controller and view layers in relation to events
  2. models are not alwasy database based
  3. 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.
comments powered by Disqus