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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T23:09:16+00:00 2026-05-27T23:09:16+00:00

Looking at some of the other questions, this is the code I implemented in

  • 0

Looking at some of the other questions, this is the code I implemented in the .m of the view implementing the custom keyboard.

- (id)initWithCoder:(NSCoder *)coder {
self = [super initWithCoder:coder];
if (self) {

    self.userInteractionEnabled = YES;

    [self addGestureRecognizer:
     [[UITapGestureRecognizer alloc] initWithTarget:self
                                             action:@selector(becomeFirstResponder)]];


   NSArray *bundle = [[NSBundle mainBundle] loadNibNamed:@"FormulaKeyboard" owner:self options:nil];

    for (id object in bundle) {
        if ([object isKindOfClass:[FormulaKeyboard class]])
            keyboard = (FormulaKeyboard *)object;
    }   


    self.inputView = keyboard;





}
return self;

}

Below is the error that showed up.

* Terminating app due to uncaught exception ‘NSUnknownKeyException’, reason: ‘[ setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key view.’

When I load the nib in an actual view controller, it works fine. However, as evidenced above, it doesn’t work when I try loading it inside another view.

Also, in the nib, I set the file owner’s class to UIViewController and attached it to the main view, since this was what another SO question instructed. I’m not sure if I need to modify this since I’m adding the custom view inside another view and not a viewc controller.

Thanks

EDIT:

.h of view implementing keyboard

@interface EquationTextField : UIView <KeyInput> {

FormulaKeyboard *keyboard;

}

@property (readwrite, retain) UIView *inputView;
@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-05-27T23:09:17+00:00Added an answer on May 27, 2026 at 11:09 pm

    Inside the xib if you ctrl + click the File's Owner you will most likely see that you have a view outlet that is connected to the top level view object in the xib.

    enter image description here

    1. Refers to an IBOutlet in your code
    2. Refers to an object in Interface Builder

    The reason this works inside a UIViewController is that a UIViewController has a property view which gets connected up when loading the xib.

    A UIView subclass does not normally have a property called view therefore you get an exception.

    Seems as you are grabbing the item from the top level objects array returned by the loadNibNamed:owner:options: method you do not need this connection in the xib. Therefore you can disconnect this connection in the xib file.

    Alternatively

    You could:

    • Change the File's Owner class to the class of your custom view.
    • Make inputView an IBOutlet
    • Connect inputView to your custom keyboard in the xib
    • Then just use

      [[NSBundle mainBundle] loadNibNamed:@"FormulaKeyboard" owner:self options:nil];
      
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm looking at some code with this form: 1 package com.stackoverflow.java.questions; 2 import java.util.ArrayList;
I was looking at some code length metrics other than Lines of Code. Something
What are some saas/web-service methodologies other than the 12-factor app ? I'm not looking
Looking at some assembly code for x86_64 on my Mac, I see the following
Looking at some of the code System.Linq I've come across some examples of Buffer<TSource>
First the code: class myClass(object): def __cmp__(self, other): return cmp(type(self), type(other)) or cmp(self.__something, other.__something)
I'm looking for some advice on how to do this. I want to have
I've been looking for some guidelines on how to layout PHP code. I've found
I'm fiddling with a bit of c++/opencv. I was looking some of the samples
Looking for some advice on the best way to implement localization along with client

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.