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 > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 02-04-2009, 02:38 AM   #1 (permalink)
Registered Member
 
Join Date: Jan 2009
Posts: 255
rpstro02 is on a distinguished road
Default web images

Hey guys,
Suppose I want to update my app with a different image every day. The only way I can really think to do this right now is to host the image on my website and use a UIWebView to display the image. But surely there's a better way. Could I possibly download just the image and then display it, resize it or do whatever I wanted with a UIImageView? That would be ideal but the part I'm stuck on is: how could I get the image from the web into my program? As always, help is greatly appreciated.

Thanks!
rpstro02 is offline   Reply With Quote
Old 02-04-2009, 02:43 AM   #2 (permalink)
1026 Development
 
Join Date: Jul 2008
Age: 23
Posts: 1,094
Jeremy1026 is on a distinguished road
Send a message via AIM to Jeremy1026
Default

There is sample code some where in these forums that shows how to download an image from the web, convert it to NSData, and then display it on the device. That would probably be a bit of a better way to go about it.
Jeremy1026 is offline   Reply With Quote
Old 02-04-2009, 09:29 AM   #3 (permalink)
Registered Member
 
RickMaddy's Avatar
 
Join Date: Oct 2008
Location: Denver, CO
Posts: 2,121
RickMaddy will become famous soon enough
Default

Look at the docs for NSData. You'll find methods for getting data from a URL.

Look at the docs for UIImage. You'll find methods for creating images from data.
RickMaddy is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 322
6 members and 316 guests
Anwerbl, guusleijsten, HowEver, LEARN2MAKE, mottdog, Objective Zero
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,649
Threads: 94,113
Posts: 402,879
Top Poster: BrianSlick (7,990)
Welcome to our newest member, Anwerbl
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 08:37 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0