Advertise here




Advertise here

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Google Sign In with OpenID

Set selected row of UIPickerView in applicationDidFinishLaunching

kieran12kieran12 Posts: 472Registered Users @ @
Hi all,

I have a UIPickerView populated with an array. I save the users selection and load it at the app launch using:
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
	[defaults setObject:[NSString stringWithFormat:@"%@", fav] forKey:@"fav"];
	[defaults synchronize];

and
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
	fav = [defaults objectForKey:@"fav"];

When the application launches I want the row the user has saved to be automatically selected in the UIPickerView.

I think that I might be saving the wrong information to do this but I'm not really sure.

Any help appreciated.

Thanks.
Post edited by kieran12 on
<a href="http://itunes.apple.com/gb/artist/kieran-mcgrady/id301040994" target="_blank">On the iOS App Store</a>

Replies

Sign In or Register to comment.