Re: Dynamically loading NIB files with a common stem
Re: Dynamically loading NIB files with a common stem
- Subject: Re: Dynamically loading NIB files with a common stem
- From: Alexander Reichstadt <email@hidden>
- Date: Wed, 06 Jul 2011 14:27:01 +0200
Try:
NSArray *sometest = [[NSBundle mainBundle] pathsForResourcesOfType:@"nib" inDirectory:@"."];
for (id thisOne in sometest){
NSLog(@"This is a path:%@",thisOne);
}
Am 06.07.2011 um 14:04 schrieb Vincent Habchi:
> Hi there,
>
> I'm, as we say in French, tearing my hair away with this little problem: Briefly, I have an object in a NIB file, and I'd like it to load further NIB files (through +[NSBundle loadNibNamed:owner:] calls), all of them ending with the same suffix (ex: onefoo, twofoo, threefoo).
>
> I just can't seem to find a way to enumerate all NIB files in the main bundle. Has somebody a clue?
>
> Thanks a lot,
> Vincent
>
> PS : If you wonder why, let's say the main object is a NSArray, and the NIB files I'd like to load contain objects that register themselves into this array, so they can be retrieved and used afterwards._______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden