Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 07-29-2010, 09:32 AM   #1 (permalink)
Sreelash
Registered Member
 
Join Date: Jul 2010
Posts: 22
Sreelash is on a distinguished road
Default Issue with loading image through URL

Hi,

I am using the following code for loading image. But its not working. Can anybody note the mistake with the code.


Code:
- (void)viewDidLoad {
    [super viewDidLoad];
	imageData = [[NSData alloc] initWithContentsOfURL:[NSURL URLWithString:@"http://66.39.113.170/images/basic_iphone_background.jpg"]];
	image = [[UIImage alloc] initWithData:imageData];
	
	imageView = [[UIImageView alloc] initWithImage:image];
	[imageView setImage:image];
	[imageView release];
}
Regards,
Sreelash
Sreelash is offline   Reply With Quote
 

» Advertisements
» Online Users: 358
13 members and 345 guests
AlanR917, AyClass, blakeart113, Domele, esoteric, ilmman, ipodphone, Kirkout, martianflash, Newbie123, Objective Zero, olivia325, Sesio
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,566
Threads: 94,081
Posts: 402,751
Top Poster: BrianSlick (7,990)
Welcome to our newest member, blakeart113
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 11:11 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.