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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T22:18:31+00:00 2026-05-18T22:18:31+00:00

I’m a little frustrated at the moment with the custom delegate process in objective-c.

  • 0

I’m a little frustrated at the moment with the custom delegate process in objective-c. I’ve used the design pattern a few times already and have a pretty good understanding of how it works. I’ve searched the internet for 2 hours trying to find what I’m doing wrong in this instance, and to no prevail. I also compared my past use of custom delegates that are functioning properly vs. this instance and can’t see any conceptual difference. so here we go:

I’m making a custom dual table view (one table for the list, and the other to hold the selections made from that list.) so that the user can make basic selections. here is the header file:

#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>


@protocol ListSelectorViewDelegate

-(void) listTableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath;
-(void) selectTableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath;

-(void) listTableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath;
-(void) selectTableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath;

- (void)listTableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath;
- (void)selectTableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath;

@end


@protocol ListSelectorDataSource

-(UITableViewCell *)listTableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath;
-(UITableViewCell *)selectTableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath;

-(NSArray *)sectionIndexTitlesForListTableView:(UITableView *)tableView editStatus:(BOOL) status;
-(NSArray *)sectionIndexTitlesForSelectTableView:(UITableView *)tableView editStatus:(BOOL) status;

-(NSInteger)listTableView:(UITableView *)tableView sectionForSectionIndexTitle:(NSString *)title atIndex:(NSInteger)index;
-(NSInteger)selectTableView:(UITableView *)tableView sectionForSectionIndexTitle:(NSString *)title atIndex:(NSInteger)index;

@end

@interface ListSelectorViewController : UIViewController {

 //Delegate
 id <ListSelectorViewDelegate> listsDelegate;
 id <ListSelectorDataSource> listsDataSource;

 //Titles
 IBOutlet UINavigationBar *pageNavBar;
 IBOutlet UINavigationBar *selectNavBar;
 IBOutlet UINavigationBar *listNavBar;

 //Tables
 IBOutlet UITableView *selectTable;
 IBOutlet UITableView *listTable;

 //Table Data
 NSMutableArray *listItems;
 NSMutableArray *selectItems;

 //Search Bars
 IBOutlet UISearchBar *selectedSearch;
 IBOutlet UISearchBar *listSearch;
 BOOL listTableIsSearching;
 BOOL selectTableIsSearching;

}

@property(nonatomic,assign) id <ListSelectorViewDelegate> listsDelegate;
@property(nonatomic,assign) id <ListSelectorDataSource> listsDataSource;


-(IBAction) newItem:(id)sender;
-(IBAction) selectAll:(id)sender;
-(IBAction) clearSelections:(id)sender;

@end

Notice the formal protocol declarations. Also note that this, along with the .m file compile fine. When I try to write a class to adopt the protocol I get the error “Cannot find protocol declaration for “ListSelectorDataSoure” “. I get the same message for the “ListSelectorViewDelegate” as well. Here is the .h file for the delegate class:

#import <Foundation/Foundation.h>
#import"ListSelectorViewController.h"

@interface ListSelectorDelegateTemplate : NSObject 
 <ListSelectorDataSource,ListSelectorViewDelegate>{

}

@end

Note that I am importing the ListSelectorViewController.h where the protocol declarations are found. Also note that when typing ” ” it does auto complete which means it does see it. Like I said, I’ve done it this exact way for other objects with no issues and cannot wrap my head around this one … Any Help at all would be greatly appreciated

  • 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-18T22:18:32+00:00Added an answer on May 18, 2026 at 10:18 pm

    Ok figured it out…. extremely stupid answer here…

    I originally created the ListSelectorViewController in a separate project and added it to the current project I’m working on… for some reason the .h and .m were not visible to the rest of the project and was the reason for the errors. simply added a new file to the project and copied over the contents of the original class.

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
this is what i have right now Drawing an RSS feed into the php,
I have just tried to save a simple *.rtf file with some websites and
I have a French site that I want to parse, but am running into
Seemingly simple, but I cannot find anything relevant on the web. What is the
Does anyone know how can I replace this 2 symbol below from the string
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I want to count how many characters a certain string has in PHP, but
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti

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.