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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T11:19:35+00:00 2026-05-20T11:19:35+00:00

I seem to be getting a new error when using LLVM Compiler 2.0, which

  • 0

I seem to be getting a new error when using LLVM Compiler 2.0, which I haven’t had before.

I have a protocol called DTGridViewDelegate defined as:

@protocol DTGridViewDelegate <UIScrollViewDelegate>

I have a property called delegate on DTGridView (a subclass of UIScrollView, which itself has a delegate property). This is defined as:

@property (nonatomic, assign) IBOutlet id<DTGridViewDelegate> delegate;

Now the message I get is:

DTGridView.h:116:63: error: property type 'id<DTGridViewDelegate>' is incompatible with type 'id<UIScrollViewDelegate>' inherited from 'UIScrollView'

Because I had said that the DTGridViewDelegate conforms to UIScrollViewDelegate, I thought that this would be ok to override this property in this way, and indeed this is the first compiler to suggest there is a problem.

I have fixed the error by declaring the property as such:

@property (nonatomic, assign) IBOutlet id<DTGridViewDelegate, UIScrollViewDelegate> delegate;

I am wondering whether this is a compiler issue?

  • 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-20T11:19:36+00:00Added an answer on May 20, 2026 at 11:19 am

    Your setup looks like the same one used in the case of UITableView inheriting from UIScrollView. The UITableViewDelegate protocol inherits from UIScrollViewDelegate protocol.

    I set up the following which compiles fine:

    // .h
    @protocol ParentClassDelegate
    -(NSString *) aDelegateMethod;
    @end
    
    @interface ParentClass : NSObject {
        id delegate;
    }
    @property(nonatomic, assign) IBOutlet id <ParentClassDelegate> delegate;
    @end
    
    //.m
    @implementation ParentClass
    @synthesize delegate;
    
    -(id) delegate{
        return @"Parent delegate";
    }//-------------------------------------(id) delegate------------------------------------
    
    -(void) setDelegate:(id)someObj{
        delegate=someObj;
    }//-------------------------------------(id) setDelegate------------------------------------
    @end
    
    //.h
    @protocol ChildClassDelegate <ParentClassDelegate>
    -(NSArray *) anotherDelegateMethod;
    @end
    
    @interface ChildClass : ParentClass{
    }
    @property(nonatomic, retain) IBOutlet id <ChildClassDelegate> delegate;
    @end
    
    //.m
    @implementation ChildClass
    //@synthesize delegate;
    
    -(id) delegate{
        return @"childDelegate";
    }//-------------------------------------(id) delegate------------------------------------
    
    -(void) setDelegate:(id)someObj{
        delegate=someObj;
    }//-------------------------------------(id) setDelegate------------------------------------
    
    @end
    

    Not sure what is causing your problem. I would note that in the header the UITableViewDelegate protocol looks like:

    @protocol UITableViewDelegate<NSObject, UIScrollViewDelegate>
    

    … so maybe the compiler likes things more explicit sometimes.

    I would suggest a clean and build. That solves a lot of problems.

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

Sidebar

Related Questions

No related questions found

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.