Skip to content

Coding Style

kolinkrewinkel edited this page Jul 29, 2011 · 10 revisions

Coding Style

How we code our stuff.


Selectors

- (void)selectorWithObj:(NSObject *)object
{
   NSObject *otherObject = [[NSObject alloc] initWithData:_dataIvar];
}

Ivars

(If an ivar is necessary) @interface Object : NSObject { @private NSObject *_object; }

(If a property is necessary)

@property (nonatomic, ..) NSObject *object;

Prepare

@synthesize object = _object;

Prefer underscore prefixed ivar over self.property

Clone this wiki locally