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 929149
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T20:07:18+00:00 2026-05-15T20:07:18+00:00

I define protocol with a method name is: – (id)initWithDelegate:(id <Foo>)delegate; While in my

  • 0

I define protocol with a method name is:

   - (id)initWithDelegate:(id <Foo>)delegate;

While in my project, there also has a third party protocol (in different class):

   - (id)initWithDelegate:(NSObject *)delegate;

In another class, which imports both protocols, I just use the second method:

id thirdPartyObject = [[ThirdPartyClass alloc] initWithDelegate:self];

but XCode display an error: self is not conform <Foo> protocol, while self don’t need to conform that protocol.

How to avoid this naming conflict?

  • 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-15T20:07:19+00:00Added an answer on May 15, 2026 at 8:07 pm

    Change the name of the method.

    - (id)initWithFooDelegate(id<Foo>)delegate;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 505k
  • Answers 505k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer As in all statistics your answer will depend on what… May 16, 2026 at 3:29 pm
  • Editorial Team
    Editorial Team added an answer Your C#/VB.NET/... code is compiled to MSIL (CIL) The MSIL… May 16, 2026 at 3:29 pm
  • Editorial Team
    Editorial Team added an answer When you add the following mapping: routes.MapRoute("hierarchy", "{action}/{*url}" new {… May 16, 2026 at 3:29 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

Theoretically, can one define a protocol where one machine does some remote calls on
In the NSObject protocol, it defines a method that is similar to this: -(Class)
#define boo(fmt, ...) SomethingToDo(fmt, __VA_ARGS__) void foo(PCSTR fmt, ...) { // some other codes
I am starting to migrate a custom serialization mechanism to Protocol Buffers. One data
Here's an excerpt from java.text.CharacterIterator documentation: This interface defines a protocol for bidirectional iteration
The descriptor protocol in Python 2.6 is only defined for class definitions, and thus
define('key_start_atz', 200); $str = 'key_start_atz'; How can I get 200 via $str ?
#define int_p int* int_p p1,p2,p3; // only p1 is a pointer ! can somebody
Background : I currently write test cases for the client side of a network
On http://java.sun.com/j2se/1.5.0/docs/api/java/net/URL.html it states that: Compares this URL for equality with another object. If

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.