Getting redefinition of View Controller pickerView:titleForRow:forComponent error
Posted
by pdenlinger
on Stack Overflow
See other posts from Stack Overflow
or by pdenlinger
Published on 2010-04-06T04:02:59Z
Indexed on
2010/04/06
4:13 UTC
Read the original article
Hit count: 180
iphone
|objective-c
Hi-- I'm working my way through the book Head First iPhone Development (O'Reilly). Am having trouble on page 68 with the following method and function; I get the error "redefinition of ViewController pickerView:titleForRow:forComponent error. Have checked the code for spaces; seems to be OK. Can you check the code and tell me what's wrong? Thank you.
-(NSString *)pickerView:(UIPickerView *)pickerView
titleForRow:(NSInteger)row forComponent: (NSInteger)component{
switch (component) {
case 0:
return [activities objectAtIndex:row];
case 1:
return [feelings objectAtIndex:row];
}
return nil;
}
© Stack Overflow or respective owner