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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T19:18:06+00:00 2026-06-08T19:18:06+00:00

I am new to objective-c and pretty much confused with the way delegates are

  • 0

I am new to objective-c and pretty much confused with the way delegates are used. I came across this code and i would like to use it to clarify some of the doubts.

#import <Foundation/Foundation.h>

@protocol ProcessDataDelegate <NSObject>

@required
- (void) processSuccessful: (BOOL)success;

@end

@interface ClassWithProtocol : NSObject 
{
  id <ProcessDataDelegate> delegate;
}

@property (retain) id delegate;

 -(void)startSomeProcess;

@end

Here, there are 2 references to the word “delegate” can anyone explain what it means when used in context with “id angled bracket delegate angled-bracket-closed” ??

Again, there is a property with name delegate. Should it not cause any kind of conflict ??

Thanks in advance,

  • 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-06-08T19:18:08+00:00Added an answer on June 8, 2026 at 7:18 pm

    Nope, there is just one property, the one defined by @property (retain) id delegate; the other one is (sort of) private variable of the NSObject which is not a property in a objective-c sense… then, you have @synthetize keyword in your .m file, which expands the property.

    The other notation, id<protocol> is telling, that delegate is expected to conform to a certain protocol.

    You can access both from the class, but you can access only property from outside. Also, for a property, some other stuff is generated – in case of retain (when not using ARC), memory management routines.

    To complete the (confusion?) lecture, there is a nice way to have class private properties, when you define them in .m file instead of .h in an anonymous category like:

    @interface MyClass()
    
    @property (nonatomic, retain) NSString privateString;
    
    @end
    
    @implementation
    @synthetize privateString;
    
    // ...
    
    @end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is probably a completely stupid question, but i'm pretty new at objective-C and
I'm pretty much new to Objective C but I've had some experience in Visual
I'm still pretty new to Objective-C coding (as evidenced by this question) and I
Hi guys this will be my first post and am pretty new to Objective-C
I'm pretty new to Objective-C so hopefully this all makes sense. I've downloaded images
It seems like this should be so simple, but I am pretty new at
I'm pretty new to Objective-C and Xcode, so it would be really helpful if
I think this is pretty simple but i'm new to Objective-C, IOS and Core
I m pretty much new to objective-C and I m doing an app in
I'm new to Objective-C. I'd like to know the best way to work with

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.