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

  • Home
  • SEARCH
  • 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 6554963
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T12:45:44+00:00 2026-05-25T12:45:44+00:00

I wonder if it is needed to declare the protocol. So, I delete a

  • 0

I wonder if it is needed to declare the protocol.

So, I delete a part that protocol declare code.

I thought that it will happen compile error.

but, Has been running without any problems.

Why need protocol declare part?

#import <UIKit/UIKit.h>


@interface SingleComponentPickerViewController : UIViewController {
// <UIPickerViewDelegate, UIPickerViewDataSource> {   ==> protocol declare part
    IBOutlet    UIPickerView *singlePicker;
                NSArray *pickerData;
}
@property (nonatomic, retain) UIPickerView *singlePicker;
@property (nonatomic, retain) NSArray *pickerData;
- (IBAction)buttonPressed:(id)sender;
@end


<UIPickerViewDelegate, UIPickerViewDataSource> <= this is what feature?
                                                  When omit this, excute without any problem. 

Below is picture After compiled screen.

It has no issues.

And excute without any problems..

enter image description here

  • 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-25T12:45:44+00:00Added an answer on May 25, 2026 at 12:45 pm

    You are not declaring the Protocol here, you are merely specifying that the your class SingleComponentPickerViewController follows the protocols you specify.

    The protocol needs to be specified if you are using any components and are setting you SingleComponentPickerViewController as their delegate. This is so the compiler knows that your class follows that specific protocol and you have implemented any required protocol methods.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wonder if anyone can provide me with the regular expressions needed to parse
Not sure if this belongs here or on ServerFault, but I wonder if someone
I came across a misleading error in SQL Server 2008 and I wonder if
I wonder whether there is an analogue of (//) in repa? It is needed
I browsed the related questions but I couldn't find what I needed since most
Currently i have system that's do resizing and creating as many images as needed
Once I needed to modify a variable that was inside another application in order
I wonder if any of you could help with this problem. The following code
Playing with Git and GitHub,I found that sometimes a git commit -a is needed
I am calling abs(int) in a SurfaceView class and getting error msg that abs(int)

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.