Augh, now, see, here's an example of what I hate about Apple's docs: you have to read it all (and remember). The reference documentation for the method does not talk about how it will find the ~ variants of files, so I assumed that was only in certain places, like the bundle Info.plist.
Thanks, Rick On Aug 17, 2011, at 7:55 , glenn andreas wrote: > More specifically, from the documentation: > > To associate a resource file with a particular device, you add a custom > modifier string to its filename. The inclusion of this modifier string yields > filenames with the following format: > > <basename><device>.<filename_extension> > > The <basename> string represents the original name of the resource file. It > also represents the name you use when accessing the file from your code. > Similarly, the <filename_extension> string is the standard filename extension > used to identify the type of the file. The <device> string is a > case-sensitive string that can be one of the following values: > > • ~ipad - The resource should be loaded on iPad devices only. > • ~iphone - The resource should be loaded on iPhone or iPod touch > devices only. On Aug 17, 2011, at 5:56 , Jim Adams wrote: > Did you check that cases of the names involved? > > -----Original Message----- > From: cocoa-dev-bounces+jim.adams=sas....@lists.apple.com > [mailto:cocoa-dev-bounces+jim.adams=sas....@lists.apple.com] On Behalf Of > Rick Mann > Sent: Wednesday, August 17, 2011 12:35 AM > To: Cocoa Developer > Subject: +[UINib nibWithNibName:bundle:] and ~iPhone > > I'm seeing some weird difference between Device and Simulator for iPhone. > > Xcode 3.2.6 > Simulator 4.3(8F190) > iOS 4.3.38J2) > > I call > > UINib* nib = [UINib nibWithNibName: @"UserLeagueCell" bundle: nil]; > > on the simulator, this actually seems to return the nib named > "UserLeagueCell~iPhone.xib". On the device, it returns the nib named > "UserLeagueCell.xib". > > Is this a known difference in the two? > > Thanks, > Rick > > _______________________________________________ > > Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) > > 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: > http://lists.apple.com/mailman/options/cocoa-dev/jim.adams%40sas.com > > This email sent to jim.ad...@sas.com > > _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com