Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6363147
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T23:59:59+00:00 2026-05-24T23:59:59+00:00

I implemented a simple UIPickerView in my app and I keep getting warnings that

  • 0

I implemented a simple UIPickerView in my app and I keep getting warnings that I can’t explain about incomplete implementation and “method in protocol not completed”. I went through a bunch of examples and could not figure out what am I missing.

Here is my code:

.h

@interface ViewTestViewController : UIViewController <UITableViewDelegate, UITableViewDataSource, UIPageViewControllerDataSource, UIPageViewControllerDataSource> {

 UIPickerView *pickerView;
NSMutableArray *pickerList;

....

}
@property (nonatomic, retain) IBOutlet UIPickerView *pickerView;
@property (nonatomic, retain) NSMutableArray *pickerList;


@end

.m

- (void)viewDidLoad
{
[super viewDidLoad];

 …

//PICKER AREA
pickerList = [[NSMutableArray alloc] init];
[pickerList addObject:@"aaa"];
[pickerList addObject:@"bbb"];

CGRect pickerFrame = CGRectMake(0, 200, 0, 0);
pickerView = [[UIPickerView alloc] initWithFrame:pickerFrame];
pickerView.showsSelectionIndicator = YES;    

}

-(IBAction)showPicker:(id)sender {

 [self.view addSubview:pickerView];

}

-(NSInteger)numberOfComponentsInPickerView:(UIPickerView *)thePickerView
{
return 1;
}

-(NSInteger)pickerView:(UIPickerView *)thePickerView numberOfRowsInComponent:(NSInteger)component
 {
return [pickerList count];
}

-(NSString *)pickerView:(UIPickerView *)thePickerView titleForRow:(NSInteger)row forComponent:(NSInteger)component
{
return [pickerList objectAtIndex:row];
}

-(void)pickerView:(UIPickerView *)thePickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component
{
NSLog(@"Selected item: %@ index of selected item: %i", [pickerList objectAtIndex:row], row);
}

- (CGFloat)pickerView:(UIPickerView *)pickerView rowHeightForComponent:(NSInteger)component
{

return 200;
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T00:00:00+00:00Added an answer on May 25, 2026 at 12:00 am

    You need to conform to the UIPickerViewDelegate and UIPickerViewDataSource in your .h like you do for UITableViewDelegate, UITableViewDataSource etc (you’re currently not)

    @interface ViewTestViewController : UIViewController <UIPickerViewDataSource, UIPickerViewDelegate, UITableViewDelegate, UITableViewDataSource, UIPageViewControllerDataSource, UIPageViewControllerDataSource> {
    

    Also, make sure you are setting self as the picker view delegate and data source when you create it:

    //PICKER AREA
    pickerList = [[NSMutableArray alloc] init];
    [pickerList addObject:@"aaa"];
    [pickerList addObject:@"bbb"];
    
    CGRect pickerFrame = CGRectMake(0, 200, 0, 0);
    pickerView = [[UIPickerView alloc] initWithFrame:pickerFrame];
    pickerView.showsSelectionIndicator = YES; 
    pickerView.dataSource = self;
    pickerView.delegate = self;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've implemented a simple app with a Mapkit that shows one pin for a
I implemented a simple C# application which inserts about 350000 records into the database.
I've implemented a simple UDP ping/pong protocol to discover other computers connected to the
I've implemented a TreeCellRenderer that returns a JCheckBox (simple code that the renderer extends
I've implemented a simple WPF splash screen window which informs the user about the
I have implemented a simple server-client script like this: Server: class Server(Protocol): def connectionMade(self):
I implemented the simple webview app through android to point to an html file
I have implemented a simple chat console app and it worked well. When i
I have implemented a simple appmod that handle WebSockets and echo back the messages.
I have implemented a simple close() method for all the Backbone views which disposes

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.