• 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
Trying to display a static image on my window. Any tips would be great
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Trying to display a static image on my window. Any tips would be great


  • Subject: Trying to display a static image on my window. Any tips would be great
  • From: Papa-Raboon <email@hidden>
  • Date: Tue, 1 Jul 2008 14:41:24 +0100

Hi All,

I have been trying to get a static image to display in a corner of my
window and it has to literally just sit there and do nothing however I
have searched and searched Apple's dodumentation but no success yet.

I have dropped an Image View onto the window in IB and set the
following in my .h file in Xcode:

       IBOutlet NSImageView *theImage;

Then in my .m file I have this so far:

        NSString *imageName;
        NSImage *tempImage;

	imageName = [[NSBundle mainBundle] pathForResource:@"logo" ofType:@"PNG"];
	tempImage = [[NSImage alloc] initWithContentsOfFile:imageName];

My image is set in my project in the resources folder and is called
logo.png and I hooked up the object to the NSImageView using IB.

Can't seem to get it to display. I believe I have a line of code
missing that will tie my MSImage to my NSImageView but not sure how.

Any Ideas please?

I'm pretty new to cocoa and don't understand all the lingo yet so be
gentle please.

Cheers
Paul
_______________________________________________

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

  • Follow-Ups:
    • Re: Trying to display a static image on my window. Any tips would be great
      • From: Steve Christensen <email@hidden>
    • Re: Trying to display a static image on my window. Any tips would be great
      • From: "Hamish Allan" <email@hidden>
  • Prev by Date: Correct Order for CFRelease-ing CFNetwork Refs?
  • Next by Date: Re: Trying to display a static image on my window. Any tips would be great
  • Previous by thread: Re: Correct Order for CFRelease-ing CFNetwork Refs?
  • Next by thread: Re: Trying to display a static image on my window. Any tips would be great
  • Index(es):
    • Date
    • Thread