Re: adding multiple assets (resources) to a project
Re: adding multiple assets (resources) to a project
- Subject: Re: adding multiple assets (resources) to a project
- From: Jens Alfke <email@hidden>
- Date: Thu, 26 Jun 2008 10:58:42 -0700
On 26 Jun '08, at 10:47 AM, email@hidden wrote:
This option works better because it retains the folder structure, but
any time I add new files, I have to delete the top assets folder
and add
everything again because the new files are not added automatically
to the
“copy bundle resources” build stage.
Um, that shouldn't be so. I've done this in several projects and it
has no trouble with newly-added files. If you close and re-open the
group in the Xcode tree does the new file show up?
Another problem I have with this approach is that nsbundle doesn't
find the files, I have to append the asset path to the path of
mainbundle to get the correct path.
NSBundle doesn't search the whole directory tree when you ask for a
resource; that would be too slow. So yes, you do need to specify the
relative path. That's what the -pathForResource:ofType:inDirectory:
method is for.
—Jens _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden