Showing posts with label Objective-C. Show all posts
Showing posts with label Objective-C. Show all posts

Wednesday, November 11, 2009

Categories

Ahogy John Muchow irja:
"As an alternative to subclassing, Objective-C categories provide a means to add methods to a class. What’s intriguing, is that any methods that you add through a category become part of the class definition, so to speak. In other words, if you add a method to the NSString class, any instance, or subclass, of NSString will have access to that method.

Defining a category is identical to defining the interface for a class, with one small exception: you add a category name inside a set of parenthesis after the interface declaration..."

Categories and Extensions leiras az iPhone OS Reference Libraryban

Monday, August 10, 2009

dot notation vagy bracket notation

Itt van a teljes cikk az eschatology-n, de a lenyeg:

  • Hasznaljunk @property deklaraciot az object state-jeinel es ezeket dot notation-nel hivjuk.
  • Hasznaljunk method deklaraciot az object behavior-jainal es ezeket bracket notation-nel hivjuk.

Monday, July 13, 2009