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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T07:27:26+00:00 2026-05-18T07:27:26+00:00

i’m sure there is a simple way to solve this problem, but I can’t

  • 0

i’m sure there is a simple way to solve this problem, but I can’t figure out.

I got a TabBarViewController with several Views. In some of the Views i loaded Tableviews with XML based content.

My XML Parser works fine, I tested it before in a separate Projectfile.
The Problem is that my TableViewController, for which I created a XMLAppDelegate to manage the parsing of my xmlfiles, still sends the methods to the main delegation file of my Project.

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[MainAppDelegate slices]: unrecognized selector sent to instance 0x6d1fd00'

Like the error message shows, he tries to send it to my MainAppDelegate, instead of the XMLAppDelegate.

I implemented the XMLAppDelegate in my Controller Files and init the delegate this way:

The .h File of my Controller

#import <UIKit/UIKit.h>

@class XMLAppDelegate, NewsDetailViewController;

@interface NewsViewController : UITableViewController <UITableViewDelegate, UITableViewDataSource> {
    IBOutlet UITableView *newsTableView;    
    XMLAppDelegate *appDelegate;
    NewsDetailViewController *ndvController;
}

@end

The .m File of my Controller

- (void)viewDidLoad {
[super viewDidLoad];
// self.navigationItem.rightBarButtonItem = self.editButtonItem;

appDelegate = (XMLAppDelegate *)[[UIApplication sharedApplication] delegate];

self.title = @"Slices";

}

The Controller is loading into the TabBarView as separate .xib file.
In this nib file i connected the Delegate and Data Source to my XMLAppDelegate.

I still get this Error in the Log and the Application crashes as I try to switch to the Tab wish the TableViewController in it.

Hope you understand my problem. Maybe someone could tell me what I’m doing wrong here setting the Delegate to my XMLAppDelegate.

EDIT:

To explain what I want to do:

I have a XMLParser class to parse the File, a Slice class to store the Elements and XMLAppDelegate. From this files i get my XML results stored in an Array with name “slices”.

To use the Elements of the Array, for showing it up as Table or textlabel, I connected the TableViewController to the XMLAppDelegate (which parses my XML Document using the XMLParser File and stores Data in the Array).

The Items of this Array are previously declared in the Files as Strings like this

@property (nonatomic, readwrite) NSInteger sliceID;
@property (nonatomic, retain) NSString *image;
@property (nonatomic, retain) NSString *title;
@property (nonatomic, retain) NSString *text;

But like i said, the parser works.
I think my problem seems to be that I requested appDelegate.slices, but the selector is not my XMLAppDelgate. The Error says it uses the Main Delegate, which don’t have any propertys of the xml Delegate file.

The TabView loads the NewsViewController, which calls for the array in the XMLAppDelegate.
I implemented the files, connected the Delegate to TableView as Data Source and Delegate, but still it seems to take the main delegate.

That drives me crazy.
The Project is a Company Profile for a great Wellness Motel.
I get the Contents from the CMS as XML-Files and need to access them from XMLAppDelegate, that delivers the sites contents.

Hope you understand my bad English. 😉

  • 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-18T07:27:27+00:00Added an answer on May 18, 2026 at 7:27 am

    So, now you’ve declared the property, but you haven’t implemented it. A property declaration, among other things, declares that you will implement one or two accessor methods for the property. So, it’s not (yet) enough just to declare the property; you must also implement the accessor methods that make that property real at run time.

    The easiest way to fix this is to synthesize the accessors for the slices property. If you need some custom behavior, you can implement them yourself, but it doesn’t sound like it—synthesizing is not only easiest, but probably the right solution.

    See the documentation on properties for more information.

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

Sidebar

Related Questions

I need to clean up various Word 'smart' characters in user input, including but
i want to parse a xhtml file and display in UITableView. what is the
public static bool CheckLogin(string Username, string Password, bool AutoLogin) { bool LoginSuccessful; // Trim

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.