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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T18:58:21+00:00 2026-05-22T18:58:21+00:00

I have seen this example on Apple’s website before, but for some reason, I

  • 0

I have seen this example on Apple’s website before, but for some reason, I cannot find it and am brainfarting. I created a TestViewController.h and .m file that subclass from UIViewController and have a .xib. In the TestAppDelegate.h, I have:

@interface TestAppDelegate : NSObject <UIApplicationDelegate> {

    TestViewController *rootController;
}

@property (nonatomic, retain) IBOutlet UIWindow *window;
@property (nonatomic, retain) IBOutlet TestViewController *rootController;

in TestAppDelegate.m, I have:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    // Override point for customization after application launch.
    [self.window addSubview:rootController.view];
    [self.window makeKeyAndVisible];
    return YES;
}

Then in my MainWindow.xib, I drag a ViewController, change the class to TestViewController, control drag the outlet from TestAppDelegate to TestViewController. It builds fine, but when I run it I get:

*** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<TestViewController 0x4d06570> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key label.'

I cannot remember what I’m missing in these steps. Any help would be appreciated. Thanks.

  • 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-22T18:58:21+00:00Added an answer on May 22, 2026 at 6:58 pm
    @interface TestAppDelegate : NSObject <UIApplicationDelegate> {
    
    TestViewController *rootController;
    }
    
    @property (nonatomic, retain) IBOutlet UIWindow *window;
    @property (nonatomic, retain) IBOutlet TestViewController *rootController;
    

    in TestAppDelegate.m, I have:

    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:    (NSDictionary *)launchOptions
    {
    // Override point for customization after application launch.
    [self.window addSubview:rootController.view];
    [self.window makeKeyAndVisible];
    return YES;
    }
    

    IF IT IS THE CODE YOU ARE REALLY USING THEN ADD FOLLOWING LINE TO YOUR INTERFACE:

    UIWindow *window;
    

    AND CHECK IF IT HELPS.

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

Sidebar

Related Questions

I have seen this macro defined before but never really knew its purpose. Can
I have seen this syntax in MSDN: yield break , but I don't know
I have seen in the apple site their big-images gallery in this link (for
I have seen the in-app purchrasing programming guide for apple. But it is mandatory
I have seen some Apple examples that do call [super viewDidUnload]; and some that
I have seen Apple's example TableSearch that when touched its scope buttons come below
I have seen this problem arise in many different circumstances and would like to
I have seen this link: Implementing Mutual Exclusion in JavaScript . On the other
I have seen this in a lot of XML comments for classes in the
I have seen this question: Are there any decent UI components for touch screen

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.