Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Tips & Tricks for iPhone Application Development

Tips & Tricks for iPhone Application Development

Presentation shown during a SkillsMatter event in London, United Kingdom.

Adrian Kosmaczewski

February 02, 2010
Tweet

More Decks by Adrian Kosmaczewski

Other Decks in Technology

Transcript

  1. Objective-C Java @interface & @implementation class (1 file) @protocol interface

    #import // files! import // classes! categories n/a (in C#, “class extensions”) id n/a (generics?)
  2. Objective-C Java @selector n/a NSObject / NSProxy / ... Object

    @public / @protected / @private public / protected / private @try / @catch / @finally NSException try / catch / finally Exception n/a package / namespace
  3. • Thin layer around C • Message-dispatch runtime • Static

    and dynamic (you choose) • The “real” inspiration for Java: • http://cs.gmu.edu/~sean/stuff/java- objc.html
  4. • Single inheritance + interfaces (“@protocols”) • @protocols can have

    optional methods • Fields protected by default • All methods are virtual and overridable • Methods can be added to existing classes • Full introspection / reflection • Messages can be intercepted and forwarded à la AOP
  5. // C++ // Memory freed when out of scope std::string

    name(“Adrian”); std::string *name = NULL; name = new std::string(“Adrian”); delete name;
  6. NDA