Go Back   MacRumors Forums > Apple Applications > iPad Apps

Reply
 
Thread Tools Search this Thread Display Modes
Old Jan 9, 2012, 09:20 PM   #1
gracejo
macrumors newbie
 
Join Date: Jan 2012
2 picker views

how do i place 2 picker views into a page itself?
i tried, 2 picker views is inserted but the objects that i added appears the same. but i coded it differently. did i code wrongly?



-(NSInteger)numberOfComponentsInPickerViewUIPickerView *) thePickerView {
return 1;
}
-(NSInteger)pickerViewUIPickerView *) thePickerView numberOfRowsInComponentNSInteger)component
{
return[list count];
}

-(NSString*)pickerViewUIPickerView *) thePickerView titleForRowNSInteger)row forComponentNSInteger)component {
return[list objectAtIndex:row];
}

//-(void)pickerViewUIPickerView *) thePickerView didSelectRowNSInteger)row inComponentNSInteger)component {
// NSLog(@"Selected Items :%@, Index of Selected item: %@",[list objectAtIndex:row], row);
//}

-(NSInteger)numberOfComponentsInPickerViewHistoryUIPickerView *) thePickerViewHistory {
return 1;
}
-(NSInteger)pickerViewHistoryUIPickerView *) thePickerViewHistory numberOfRowsInComponentNSInteger)component
{
return [historyDates count];
}

-(NSString*)pickerViewHistoryUIPickerView *) thePickerViewHistory titleForRowNSInteger)row forComponentNSInteger)component {
return [historyDates objectAtIndex:row];
}






- (void)viewDidLoad
{
[super viewDidLoad];

list = [[NSMutableArray alloc] init];[list addObject:@"Temperature"];[list addObject:@"Humility"];[list addObject:@"Light"];


historyDates = [[NSMutableArray alloc] init];
[historyDates addObject:@"3 days ago"];
[historyDates addObject:@"2 days ago"];
[historyDates addObject:@"1 day ago"];

}
gracejo is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Applications > iPad Apps

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Neat Color Picker ArtOfWarfare iPhone/iPad Programming 5 Jan 12, 2014 07:53 PM
customize text width of picker JPfowl iPhone/iPad Programming 9 Oct 16, 2013 03:23 PM
how can i show only picker and hid the keyboard ??? zizos iPhone/iPad Programming 21 Apr 8, 2013 04:42 PM
Character Picker disabled? chrf097 OS X 10.8 Mountain Lion 5 Mar 29, 2013 08:45 AM
Accent Picker started appearing today SamIchi OS X 2 Feb 10, 2013 03:50 PM

Forum Jump

All times are GMT -5. The time now is 01:35 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC