I would know how loadNibNamed
of NSBundle
class works; In some document I find something like
[[NSBundle mainBundle] loadNibNamed:@"mynib" owner:self options:NULL];
without return value; just called inside a method (e.g. cellForRowAtIndexPath
if I want to customize my cell). In other documents I find:
NSArray* vett=[[NSBundle mainBundle] loadNibNamed:@"mynib" owner:self options:NULL];
In this case, for example, in cellForRowAtIndexPath
, I could
return [vett lastObject];
or something like this. The latter method seems to me clear; I load the nib in a vector and then I use the vector elements. The problem is understanding what exactly do the first:
[[NSBundle mainBundle] loadNibNamed:@"mynib" owner:self options:NULL];
no return value, no cell reference...where are the objects of my nib? how are they handled? I don't understand how it works