• 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: Display a jpeg file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Display a jpeg file


  • Subject: Re: Display a jpeg file
  • From: Tage Borg <email@hidden>
  • Date: Mon, 22 May 2006 13:08:19 +0200

(Originally sent to Angelo only, resending it to the list to indicate that the question has been answered.)

Place an NSImageView in a window. Create a controller with an outlet named img. Generate files for the controller. Add the awakeFromNib message as follows:

- (void)awakeFromNib {
	NSImage *image = [[NSImage alloc] initWithContentsOfURL:
		[NSURL URLWithString:@"http://www.tbef.se/viktor/framsteg.jpg";]];
	[img setImage:image];
	[image release];
}

--Tage

On 2006-05-22, at 10:05, Angelo Chen wrote:

Hi,

I'm looking for some sample code that displays a jpeg
file, any one in the net? thanks.

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

-- Tage Borg Project Management, SW Architecture, Design, Development ph +46703967328 (GMT+1) email@hidden www.tbef.se


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Display a jpeg file (From: Angelo Chen <email@hidden>)

  • Prev by Date: Virtual folder
  • Next by Date: Re: Virtual folder
  • Previous by thread: Display a jpeg file
  • Next by thread: Tracking Cocoa Builds & Release Notes
  • Index(es):
    • Date
    • Thread