 |
 |
|
 |
02-04-2009, 03:38 AM
|
#1 (permalink)
|
|
Registered Member
Join Date: Jan 2009
Posts: 231
|
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!
|
|
|
02-04-2009, 03:43 AM
|
#2 (permalink)
|
|
1026 Development
Join Date: Jul 2008
Age: 21
Posts: 783
|
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.
|
|
|
02-04-2009, 10:29 AM
|
#3 (permalink)
|
|
New Member
Join Date: Oct 2008
Location: Denver, CO
Posts: 2,121
|
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.
|
|
|
 |
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
» Advertisements |
» Online Users: 486 |
| 62 members and 424 guests |
| activ8, Alexman, amiralic, amoll, angelFrog, bbc z, BillHerr79, bluemonkey, brianmethod, BrianSlick, Chonch, Corsu, CoxTral, craig.w, danbaumbach, dany88, dda, digidan, dre, Drudoo, eemceebee, eJohnny, Erle, fede, gjosef, healthyutech, imsatasia, Jeremy1026, JJGEight, johny_abo, KenPletzer, krisix, lanej, linuxgood, lws, MacSteve85, markbuchanan, mlfarrell, mlo, Mopedhead, Mr Jack, MrMattMac, nicholask, nonamelive, Nungster, P2k, pokypine, QAD, raees, redmouse, ryguy2503, scotopia, staticouture, TheAppByte, TheGiant, themathminister, tomoan74, Tuszy, xyster, zivido, ZunePod |
| Most users ever online was 779, 05-11-2009 at 10:55 AM. |
» Stats |
Members: 21,499
Threads: 35,780
Posts: 156,754
Top Poster: smasher (2,448)
|
| Welcome to our newest member, staticouture |
|