Advertise here

Advertise here

Howdy, Stranger!

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

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];

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.

Post edited by kieran12 on
<a href="" target="_blank">On the iOS App Store</a>


Sign In or Register to comment.