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

Mockup & CodeGen, iPhone & iPad
($9.99)

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

Manu
($0.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 01-30-2010, 08:19 PM   #1 (permalink)
simpsonaty Apps
 
simpsonaty's Avatar
 
Join Date: Dec 2009
Location: Australia
Posts: 93
Default Simple Question Regarding UIImageView

I have a UIImageView loaded with 'image1'. When I execute an IBAction, I want to change the image in the UIImageView to 'image2'. I know how to do this.

Now when the user closes the app and re-opens it, I want the image to load as 'image2', not 'image1'. I guess you would use NSUserDefaults to store the image but I'm not 100% sure on how to do this.

Thanks in advance!
__________________
http://simpsonatyapps.com
... yep, that's our site.
simpsonaty is offline   Reply With Quote
Old 01-30-2010, 08:36 PM   #2 (permalink)
Emphasizing Fundamentals
 
BrianSlick's Avatar
 
Join Date: Jul 2009
Location: NoVA / DC Area
Age: 36
Posts: 7,129
Default

NSUserDefaults, yes. Just store the image name.
__________________
BriTer Ideas LLC - Code review, consulting, development. PM for pricing.

SlickShopper 2 | Free NSLog utility | Leave a PayPal donation.

Are you a newbie? Things you should read:
BrianSlick is offline   Reply With Quote
Old 01-30-2010, 08:43 PM   #3 (permalink)
simpsonaty Apps
 
simpsonaty's Avatar
 
Join Date: Dec 2009
Location: Australia
Posts: 93
Default

I'll look into it a little more, thanks anyway.
__________________
http://simpsonatyapps.com
... yep, that's our site.
simpsonaty is offline   Reply With Quote
Reply

Bookmarks

Tags
data, ibaction, nsuserdefaults, store, uiimageview

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: 234
16 members and 218 guests
ADY, Alsahir, cacao, dacapo, Dani77, Desert Diva, djohnson, F_Bryant, HemiMG, jansan, M@realobjects, MarkC, prchn4christ, smethorst, spiderguy84
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,882
Threads: 89,228
Posts: 380,762
Top Poster: BrianSlick (7,129)
Welcome to our newest member, jansan
Powered by vBadvanced CMPS v3.1.0

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