Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

ITCreative

macrumors member
Original poster
Aug 4, 2011
46
0
my project contain two view Controller and both contain Picker view

but i want when user select item from picker view in first controller

the anther picker view in second controller fill component depend on which user

select in the first .


How can do this :confused:
 
Last edited:
@ITCreative Please stop going overboard with the fonts and colours. It will not get you any more help. In fact, it might put people off reading your thread.
 
Thanks a lot for all


I try it but when i select item from piker view in first controller

the white screen display without any thing.

Code:
- (void)pickerView:(UIPickerView *)pickerView 
	  didSelectRow:(NSInteger)row 
	   inComponent:(NSInteger)component
{
	
	switch (row){
			
		case 0: 
			break;
			
		case 1: 
			NSString *myfile = [[NSBundle mainBundle] pathForResource:@"list" ofType:@"plist"];
	Names =[[NSArray alloc] initWithContentsOfFile:myfile];
			[self presentModalViewController:secondController animated:YES];
			break;
			
		case 2:
	NSString *myfile = [[NSBundle mainBundle] pathForResource:@"menu" ofType:@"plist"];
	Names =[[NSArray alloc] initWithContentsOfFile:myfile];
			[self presentModalViewController:secondController animated:YES];
			break;
		:
:
::
etc

Note : the picker view in the second screen dataSource & delegate link to

Second Controller and fill component from plist
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.