• 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 Images to a Cocoa Application in XCode
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Adding Images to a Cocoa Application in XCode


  • Subject: Re: Adding Images to a Cocoa Application in XCode
  • From: PGM <email@hidden>
  • Date: Sun, 1 Jul 2007 18:01:35 -0400


David,

Check out - [NSBundle pathForImageResource:]

You can use that if you add the images to your project as resources,
they will be copied into your application bundle and you will be
raring to go.

Peace, Alan


The adding of images mentioned by Allan is as simple as dragging them from the Finder to the sidebar of your Xcode project. If your images are added to the project, you can also simply use:


NSImage *myImage = [NSImage imageNamed:@"babyInBathTub.jpg"];

Cheers, Patrick
_______________________________________________

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: 
 >Adding Images to a Cocoa Application in XCode (From: David Arnold <email@hidden>)
 >Re: Adding Images to a Cocoa Application in XCode (From: "Alan Smith" <email@hidden>)

  • Prev by Date: Re: Creating drag images from NSView snapshots
  • Next by Date: [moderator] Re: Application Design
  • Previous by thread: Re: Adding Images to a Cocoa Application in XCode
  • Next by thread: Re: Adding Images to a Cocoa Application in XCode
  • Index(es):
    • Date
    • Thread