• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Adding an image to a project
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Adding an image to a project


  • Subject: Re: Adding an image to a project
  • From: Andy Lee <email@hidden>
  • Date: Thu, 15 Jul 2010 06:23:22 -0400

On Jul 15, 2010, at 5:25 AM, Vincenzo Morgante wrote:

>>  If you put the image into your project and add it to your application target, Xcode will> automatically add it to a "Copy Files" build phase that places the image into> WhateverApp.app/Contents/Resources/imagename.png. That is also the place that -> pathForResource:ofType: will look for it. The link that Sam Reshu posted earlier explains> this in more detail.
> Into the folder containing my project there are the following files and folders:- the folders "build", "English.lproj" and "OsiriX Headers";- the files "Info.plist", "DisplayReport_Prefix.pch", "DisplayReport.xcodeproj", "DisplayReport.h", "DisplayReport.m", "version.plist", "report.png".I searched "report.png" into the folder "build", but I don't found it...The subfolder "Resources" does not exist...

Actually I believe it is not enough for the image just to be in your project -- it must be in the Resources group (or at least that's the easiest way to get it automatically copied).  "Resources" is a group, which doesn't mean there is a folder with that name, it is just a conceptual grouping of files such as your nib files which are treated as application resources and therefore copied to the application bundle.  Try dragging imagename.png to the Resources group.

--Andy


_______________________________________________

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

References: 
 >Re: Adding an image to a project (From: Vincenzo Morgante <email@hidden>)

  • Prev by Date: Re: atomic properties and KVC
  • Next by Date: Re: Adding an image to a project
  • Previous by thread: Re: Adding an image to a project
  • Next by thread: Re: Adding an image to a project
  • Index(es):
    • Date
    • Thread