objective c - Class Name with a "+" -
i working on ios project in xcode , see classes have names "+"; example: tableviewcontroller+tableview.h
, class named: @interface rktableviewcontroller (tableview)
opposed rktableviewcontroller+tableview
.
what +
, (tableview)
? if subclassing uitableview
shouldn't class declared as: subclassed name : parent class name
format?
the + in filename isn't semantically important. naming file "classname+categoryname.h/m" popular convention naming files containing categories.
@interface rktableviewcontroller (tableview) @end
declares category called "tableview" on rktableviewcontroller
class. categories used add methods class outside main implementation. see apple documentation on categories here: http://developer.apple.com/library/ios/#documentation/cocoa/conceptual/objectivec/chapters/occategories.html
Comments
Post a Comment