Tuesday 28 July 2009

Loading custom views in nib file

Sorry for not posting for six months -- we've been pretty busy..

So here's a tip for loading custom-implemented views in your nib file. Don't use initwithframe, but initwithcoder:


- (id)initWithCoder:(NSCoder *)decoder {
// required for loading from iface builder
if (self = [super initWithCoder:decoder]) {
// your init code here........
}
return self;
}

No comments: