Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.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-09-2010, 02:48 PM   #1 (permalink)
Registered Member
 
Join Date: May 2010
Location: Montreal, QC
Posts: 9
Craftpaper is on a distinguished road
Send a message via Skype™ to Craftpaper
Arrow UIPickerView titleForRow not called - View with two pickers

Hi!
I'm currently working on a single View with two pickerViews.
I've found something like :

Code:
- (NSInteger)pickerView:(UIPickerView *)thePickerView numberOfRowsInComponent:(NSInteger)component
{
if([thePickerView isEqual:pickerView ]){ 
    return [arrayNo count];
}
else if([thePickerView isEqual:pickerView2]){       
    return [arrayRootNote count];
}

else{
    return 0;
}

}  
- (NSString *)pickerView:(UIPickerView *)thePickerView titleForRow:(NSInteger)row forComponent:(NSInteger)component {
 if([thePickerView isEqual:pickerView])
 { 
   return [arrayNo objectAtIndex:row];
}
else if([thePickerView isEqual:pickerView2]){       
    return [arrayRootNote objectAtIndex:row];
}

else{
    return [arrayRootNote objectAtIndex:row];
}

 NSLog(@"I am a called method"); 
}
What I want is to change the title of each picker (populated by the two NSMutableArrays). The problem is that the two pickers are showing the "ArrayNo" of the pickerView.

I've found with the debugger (and the NSLog) that the method titleForRow is not called at all.
Any idea? Thanks in advance

Séraphin
Craftpaper is offline   Reply With Quote
Old 09-09-2010, 02:57 PM   #2 (permalink)
Registered Member
 
Join Date: May 2010
Location: Montreal, QC
Posts: 9
Craftpaper is on a distinguished road
Send a message via Skype™ to Craftpaper
Default

the delegate is set with

pickerView.delegate = self;
pickerView2.delegate = self;

And everything is connected with IB!
Craftpaper is offline   Reply With Quote
Reply

Bookmarks

Tags
multiple, picker, pickerview, titleforrow, uipickerview

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
» Online Users: 335
10 members and 325 guests
bignoggins, carlandrews, flamingliquid, hzwegjxg, ilmman, jenniead38, linkmx, nadav@webtview.com, stanny
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,657
Threads: 94,116
Posts: 402,889
Top Poster: BrianSlick (7,990)
Welcome to our newest member, jenniead38
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 11:51 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0