Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Applications > iPad Apps

Thread Tools Search this Thread Display Modes
Old Jan 9, 2012, 09:20 PM   #1
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

MacRumors Forums > Apple Applications > iPad Apps

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
Help ! Table View vs Picker View. cthesky iPhone/iPad Programming 1 Sep 30, 2011 06:52 AM
Why does my Picker View show nothing? mikezang iPhone/iPad Programming 11 Oct 16, 2010 11:49 AM
How to change date format for date picker view? mikezang iPhone/iPad Programming 6 Oct 16, 2010 11:16 AM
how can display picker view in actionsheet rup28aug iPhone/iPad Programming 3 Jun 10, 2009 09:37 AM
Resizing a picker view? jsnuff1 iPhone/iPad Programming 2 Aug 6, 2008 08:30 PM

All times are GMT -5. The time now is 08:19 PM.

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

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