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 02-18-2010, 01:11 PM   #1 (permalink)
Registered Member
 
AppStoreMod's Avatar
 
Join Date: Jul 2009
Location: Sacramento,CA
Posts: 90
Send a message via Skype™ to AppStoreMod
Default NSUserDefaults Transferring Data

Hi, I am working on transferring data via NSUserDefaults and I have to 2 views which I am using a certain transition on and I don't think it really matters. I am not allows to mention what the transition is according to Apple but you developers will probably know which new transition I am talking about. So I want to transfer an image to pop up on the first view. So I have 2 views. When you first open the app thats your mainview and on the bottom right there is a info button that takes you to a settings view. I have a UISegmentBar on that view and I want it where if you select one of the segments then go back to the mainview it changes the mainviews image to the image you selected on the settings view. So this is the code I put in the Settings view:

Quote:
if(segment.selectedSegmentIndex == 0)
{
NSUserDefaults *sport = [NSUserDefaults standardUserDefaults];
[sport setObject:[UIImage imageNamed:@"Basketball.png"] forKey:@"basketballKey"];
[sport synchronize];
}
and this is what I put in the mainview which is suppose to retrieve the data in the viewdidload.

Quote:
mainImage.image = [[NSUserDefaults standardUserDefaults] objectForKey:@"basketballKey"];
Also the transition I am using doesn't have a back button because thats the new transition. So yea. What can I do? Please help asap if you can.
__________________
- AppStoreMod
Youtube | Website | Twitter | Xcode Video Tutorials | AppStoreApps
AppStoreMod is offline   Reply With Quote
Reply

Bookmarks

Tags
data, nsuserdefaults, retrieve, transferring, transtion

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: 239
19 members and 220 guests
ADY, AragornSG, BrianSlick, Dani77, Dattee, dre, glenn_sayers, HemiMG, JasonR, karlam963, nobre84, Oral B, prchn4christ, Raggou, Rudy, spiderguy84, themathminister, viniciusdamone, vvenkatachallam
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,884
Threads: 89,229
Posts: 380,763
Top Poster: BrianSlick (7,129)
Welcome to our newest member, karlam963
Powered by vBadvanced CMPS v3.1.0

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