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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T15:51:28+00:00 2026-06-17T15:51:28+00:00

I’m working on an app with a Split View controller and would like to

  • 0

I’m working on an app with a Split View controller and would like to store the main data class in the App Delegate so I can access it from multiple views (MasterView, DetailView, and several PopUps).

I’m a bit of a noob and can’t figure out why Im getting the error:

AppDelegate.m:31:26: Property ‘dataController’ not found on object of type ‘MasterViewController’

Below is the relevant code – any help is much appreciated. Thanks.

AppDelegate.h

#import <UIKit/UIKit.h>

@class EventClassDataController;
@class MasterViewController;

@interface AppDelegate : UIResponder <UIApplicationDelegate>

@property (strong, nonatomic) UIWindow *window;

@end

AppDelegate.m

#import <UIKit/UIKit.h>

@class EventClassDataController;
@class MasterViewController;

@interface AppDelegate : UIResponder <UIApplicationDelegate>

@property (strong, nonatomic) UIWindow *window;

@end

MasterViewController.h

#import <UIKit/UIKit.h>

@class DetailViewController;
@class EventClassDataController;

@interface MasterViewController : UITableViewController

@property (strong, nonatomic) EventClassDataController *dataController;
@property (strong, nonatomic) DetailViewController *detailViewController;

@end

MasterViewController.m

#import "MasterViewController.h"
#import "DetailViewController.h"
#import "EventClassDataController.h"
#import "EventClass.h"

@interface MasterViewController ()

@end

@implementation MasterViewController

@synthesize detailViewController, dataController;

- (void)awakeFromNib
{
    self.clearsSelectionOnViewWillAppear = NO;
    self.contentSizeForViewInPopover = CGSizeMake(320.0, 600.0);
    [super awakeFromNib];

    // Initialize event data
    self.dataController = [[EventClassDataController alloc] init];
}

EventClassDataController.h

#import <Foundation/Foundation.h>

@class EventClass;

@interface EventClassDataController : NSObject

@property (nonatomic, copy) NSMutableArray *masterEventList;

-(NSUInteger)countOfList;
-(EventClass *)objectInListAtIndex:(NSUInteger)theIndex;
-(void)addNewEvent:(EventClass *)event;
-(void)removeEvent:(EventClass *)event;

@end
  • 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-17T15:51:30+00:00Added an answer on June 17, 2026 at 3:51 pm

    You need to add

    #import "MasterViewController.h"
    

    to AppDelegate.m.

    Explantation:

    From your error message I can tell that you’re trying to access a property of MasterViewController on line 26 of your AppDelegate. However, in your AppDelegate class you only have a forward declaration (“@class MasterViewController”) and you don’t include the actual header file for MasterViewController. What this means is that AppDelegate knows there exists a class named MasterViewController somewhere in your project… but that’s all it knows. AppDelegate doesn’t know anything about the contents of MasterViewController, i.e. properties or methods MasterViewController declares.

    The reason to use @class in a header file is so that you can have properties in an @interface such as

    @property (nonatomic, strong) MasterViewController * appDelegatesReferenceToMasterViewController;
    

    without having to import MasterViewController.h in AppDelegate.h. This way, other files in your project can import AppDelegate.h without also inadvertently importing MasterViewController.h.

    Translation:

    You writing the code:

    @class MasterViewController;
    

    is like saying to the compiler:

    Yo… compiler. I’m going to be talking about something called MasterViewController in this header file and you don’t know what a MasterViewController is… but don’t trip out bro. It’s all good.

    But then, later in the .m file after you write the code:

    ... masterViewController.dataController ...
    

    the compiler responds:

    Whoa, whoa, whoa. I was cool with you just having a variable with the type MasterViewController in the header file because you told me it was all good and not to worry. But now here you are trying to use some aspect of MasterViewController that I know nothing about. How am I supposed to know if this is legal or not? Not cool bro.

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

Sidebar

Related Questions

I would like to run a str_replace or preg_replace which looks for certain words
I would like my Web page http://www.gmarks.org/math_in_e-mail.txt on my Apache 2.2.14 server to display
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I would like to count the length of a string with PHP. The string
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a jquery bug and I've been looking for hours now, I can't
I've got a string that has curly quotes in it. I'd like to replace
I am doing a simple coin flipping experiment for class that involves flipping a
I am trying to render a haml file in a javascript response like so:

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.