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 09-14-2009, 02:38 AM   #1 (permalink)
Registered Member
 
Join Date: Jun 2009
Posts: 159
Default Problem with UIPicker didSelectRow

Hi all,

In my application I have a two component UI Picker, I have coded the program so that when a user selects value in col 1 or col 2 in the Picker a label is updated with what is selected.

This works pretty fine until I tested it out on my iPhone last night I noticed that when I spin both picker component wheels at the same time back and forth and let go the picker selected values might show

col1 = green col2 = navy

However my label just shows Green - Black (to me it seems like some form of delay perhaps through the if statement which I coded.

Code:
- (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component
{	
	if (component == kSecondaryColourComponent)
	{
		part2 = [self.SecondaryColourTypes objectAtIndex:row];
	} else {
		part1 = [self.PrimaryColourTypes objectAtIndex:row];		
	}
	
	NSString *result = [NSString stringWithFormat:@"Your Selected Colours are: %@%@", part1, part2];
	
	
	NSLog(@"Your Selected Colours are: %@%@", part1, part2);
	labelColour.text = result;
}
Any tips would be appreciated.

Thanks Aaron
bluemonkey is offline   Reply With Quote
Old 09-14-2009, 04:34 PM   #2 (permalink)
Registered Member
 
Join Date: Jun 2009
Posts: 159
Default

Has anyone got any thoughts on this one?

Thanks
bluemonkey is offline   Reply With Quote
Reply

Bookmarks

Tags
didselectrow, pickerview, uipicker

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
» 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:12 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0