title: setValue:forUndefinedKey: this class is not key value coding-compliant for the key
body: <p>I'm creating a login to view support tickets. The first view is the ticket view, and if you're not logged in pushes you to the login screen. However I receive this:</p>
  
  <blockquote>
    <p>Support[3209:18e03] <strong>* Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[ setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key LoginScreen.' *</strong></p>
    
    <p>First throw call stack:
    (0x1f17012 0x1634e7e 0x1f9ffb1 0x10e1711 0x1062ec8 0x10629b7 0x108d428 0x7990cc 0x1648663 0x1f1245a 0x797bcf 0x65ce37 0x65d418 0x65d648 0x65d882 0x669235 0x8683d2 0x6664f3 0x666777 0x6667b7 0x9d1fe2 0x9c3ad9 0x65e422 0x2b15 0x65f753 0x65fb2f 0x661286 0x65fe3f 0x592910 0x592895 0x5926e5 0x1edfafe 0x1edfa3d 0x1ebd7c2 0x1ebcf44 0x1ebce1b 0x22aa7e3 0x22aa668 0x57c65c 0x1f0d 0x1e35)
    libc++abi.dylib: terminate called throwing an exception</p>
  </blockquote>
  
  <p>Here is my code for LoginScreen.m</p>
  
  <pre><code>#import "UIAlertView+error.h"
  #import "LoginScreen.h"
  #import "API.h"
  #include &lt;CommonCrypto/CommonDigest.h&gt;
  
  #define sayWhat @"REMOVEDFORSECURITY"
  
  
  @implementation LoginScreen
  
  -(void)viewDidLoad {
      NSLog(@"Found me!");
      [super viewDidLoad];
  
  
      //focus on the username field /show keyboard
      [fldUsername becomeFirstResponder];
  }
  
  
  - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
  {
          // Return YES for supported orientations
          return (interfaceOrientation == UIInterfaceOrientationPortrait);
      }
  
      -(IBA
  
  ction)btnLoginRegisterTapped:(UIButton*)sender {
      if (fldUsername.text.length &lt; 4 || fldPassword.text.length &lt; 4){
          [UIAlertView error:@"Enter username and password over 4 chars each."];
          return;
      }
  
      //very basic encryption called "salting"
      NSString* saltedPassword = [NSString stringWithFormat:@"%@%@", fldPassword.text, sayWhat];
  
      //prep the hashed storage
      NSString* hashedPassword = nil;
      unsigned char hashedPasswordData[CC_SHA1_DIGEST_LENGTH];
  
      //actually hash this
      NSData *data = [saltedPassword dataUsingEncoding: NSUTF8StringEncoding];
      if (CC_SHA1([data bytes], [data length], hashedPasswordData)){
          hashedPassword = [[NSString alloc] initWithBytes:hashedPasswordData length:sizeof(hashedPasswordData) encoding:NSASCIIStringEncoding];
          } else {
              [UIAlertView error:@"Password can't be sent"];
                  return;
          }
  
      NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
          fldUsername.text, @"username",
                                     hashedPassword, @"password", nil];
      //here is the web call finally!
      [[API sharedInstance] commandWithParams:params
                                 onCompletion:^(NSDictionary *json){
          //returned result
         NSDictionary* res = [[json objectForKey:@"result"] objectAtIndex:0];
  
          if([json objectForKey:@"error"]==nil &amp;&amp; [[res objectForKey:@"userid"] intValue]&gt; 0) {
                                         //success
          } else {
                                         //error'
          [UIAlertView error:[json objectForKey:@"error"]];
                                     }
  
      }];
  
  
  }
  @end
  </code></pre>
  
  <p>and LoginScreen.h</p>
  
  <pre><code>#import &lt;UIKit/UIKit.h&gt;
  
  @interface LoginScreen : UIViewController {
  //the login form fields
  IBOutlet UITextField* fldUsername;
  IBOutlet UITextField* fldPassword;
  
  }
  
  //action for when either button is pressed
  -(IBAction)btnLoginRegisterTapped:(id)sender;
  
  @end
  
  
      &lt;?xml version="1.0" encoding="UTF-8" standalone="no"?&gt;
  &lt;document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="2.0" toolsVersion="2844" systemVersion="12C60" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="A8c-eR-geg"&gt;
      &lt;dependencies&gt;
          &lt;plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="1930"/&gt;
      &lt;/dependencies&gt;
      &lt;scenes&gt;
          &lt;!--Tickets View - View Tickets--&gt;
          &lt;scene sceneID="aIJ-Wx-2Yy"&gt;
              &lt;objects&gt;
                  &lt;viewController title="View Tickets" id="T0P-Bi-31w" customClass="TicketsView" sceneMemberID="viewController"&gt;
                      &lt;view key="view" contentMode="scaleToFill" id="4zZ-I2-ltX"&gt;
                          &lt;rect key="frame" x="0.0" y="64" width="320" height="504"/&gt;
                          &lt;autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/&gt;
                          &lt;subviews&gt;
                              &lt;label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="You Made It" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Fbu-Sr-Mgf"&gt;
                                  &lt;fontDescription key="fontDescription" type="system" pointSize="17"/&gt;
                                  &lt;color key="textColor" cocoaTouchSystemColor="darkTextColor"/&gt;
                                  &lt;nil key="highlightedColor"/&gt;
                              &lt;/label&gt;
                          &lt;/subviews&gt;
                          &lt;color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/&gt;
                          &lt;constraints&gt;
                              &lt;constraint firstItem="Fbu-Sr-Mgf" firstAttribute="top" secondItem="4zZ-I2-ltX" secondAttribute="top" constant="138" id="QBp-qM-fKP"/&gt;
                              &lt;constraint firstItem="Fbu-Sr-Mgf" firstAttribute="leading" secondItem="4zZ-I2-ltX" secondAttribute="leading" constant="115" id="goO-5h-RZK"/&gt;
                          &lt;/constraints&gt;
                      &lt;/view&gt;
                      &lt;navigationItem key="navigationItem" id="vu4-JX-C3v"/&gt;
                      &lt;simulatedNavigationBarMetrics key="simulatedTopBarMetrics" prompted="NO"/&gt;
                      &lt;connections&gt;
                          &lt;segue destination="TOB-FA-Ss4" kind="modal" identifier="ShowLogin" id="dJH-ge-8CV"/&gt;
                      &lt;/connections&gt;
                  &lt;/viewController&gt;
                  &lt;placeholder placeholderIdentifier="IBFirstResponder" id="aSa-2G-5fx" userLabel="First Responder" sceneMemberID="firstResponder"/&gt;
              &lt;/objects&gt;
              &lt;point key="canvasLocation" x="-518" y="-841"/&gt;
          &lt;/scene&gt;
          &lt;!--Login Screen - Login--&gt;
          &lt;scene sceneID="6iZ-QL-7ID"&gt;
              &lt;objects&gt;
                  &lt;viewController title="Login" id="TOB-FA-Ss4" customClass="LoginScreen" sceneMemberID="viewController"&gt;
                      &lt;view key="view" contentMode="scaleToFill" id="w9e-4U-cwC"&gt;
                          &lt;rect key="frame" x="0.0" y="64" width="320" height="504"/&gt;
                          &lt;autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/&gt;
                          &lt;subviews&gt;
                              &lt;label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Blue Label Hosting Login" lineBreakMode="tailTruncation" minimumFontSize="10" translatesAutoresizingMaskIntoConstraints="NO" id="SuD-JI-L2T"&gt;
                                  &lt;fontDescription key="fontDescription" type="system" pointSize="17"/&gt;
                                  &lt;color key="textColor" cocoaTouchSystemColor="darkTextColor"/&gt;
                                  &lt;nil key="highlightedColor"/&gt;
                              &lt;/label&gt;
                              &lt;textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Username" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="NeI-zB-U8Y"&gt;
                                  &lt;constraints&gt;
                                      &lt;constraint firstAttribute="height" constant="31" id="BlH-cG-Jdh"/&gt;
                                      &lt;constraint firstAttribute="width" constant="208" id="Osb-tj-fjn"/&gt;
                                  &lt;/constraints&gt;
                                  &lt;fontDescription key="fontDescription" type="system" pointSize="14"/&gt;
                                  &lt;textInputTraits key="textInputTraits"/&gt;
                              &lt;/textField&gt;
                              &lt;textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Password" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="4Fi-NX-kli"&gt;
                                  &lt;constraints&gt;
                                      &lt;constraint firstAttribute="height" constant="31" id="X3j-X2-ton"/&gt;
                                  &lt;/constraints&gt;
                                  &lt;fontDescription key="fontDescription" type="system" pointSize="14"/&gt;
                                  &lt;textInputTraits key="textInputTraits" secureTextEntry="YES"/&gt;
                              &lt;/textField&gt;
                              &lt;button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="5o5-83-KbW"&gt;
                                  &lt;constraints&gt;
                                      &lt;constraint firstAttribute="height" constant="36" id="Afu-6h-uru"/&gt;
                                      &lt;constraint firstAttribute="width" constant="161" id="Ef5-df-Jmp"/&gt;
                                  &lt;/constraints&gt;
                                  &lt;fontDescription key="fontDescription" type="boldSystem" pointSize="15"/&gt;
                                  &lt;state key="normal" title="Login"&gt;
                                      &lt;color key="titleColor" red="0.19607843459999999" green="0.30980393290000002" blue="0.52156865600000002" alpha="1" colorSpace="calibratedRGB"/&gt;
                                      &lt;color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/&gt;
                                  &lt;/state&gt;
                                  &lt;state key="highlighted"&gt;
                                      &lt;color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/&gt;
                                  &lt;/state&gt;
                                  &lt;connections&gt;
                                      &lt;action selector="btnLoginRegisterTapped:" destination="w9e-4U-cwC" eventType="touchUpInside" id="Wgb-L8-sAJ"/&gt;
                                  &lt;/connections&gt;
                              &lt;/button&gt;
                          &lt;/subviews&gt;
                          &lt;color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/&gt;
                          &lt;constraints&gt;
                              &lt;constraint firstItem="NeI-zB-U8Y" firstAttribute="top" secondItem="SuD-JI-L2T" secondAttribute="bottom" constant="8" symbolic="YES" type="default" id="0Pv-zM-WId"/&gt;
                              &lt;constraint firstItem="4Fi-NX-kli" firstAttribute="top" secondItem="NeI-zB-U8Y" secondAttribute="bottom" constant="8" symbolic="YES" type="default" id="2Sw-m8-LND"/&gt;
                              &lt;constraint firstItem="4Fi-NX-kli" firstAttribute="trailing" secondItem="NeI-zB-U8Y" secondAttribute="trailing" type="default" id="88O-VQ-qut"/&gt;
                              &lt;constraint firstItem="SuD-JI-L2T" firstAttribute="centerX" secondItem="NeI-zB-U8Y" secondAttribute="centerX" type="default" id="Qu9-PG-YWz"/&gt;
                              &lt;constraint firstItem="4Fi-NX-kli" firstAttribute="centerX" secondItem="5o5-83-KbW" secondAttribute="centerX" type="default" id="RAm-sI-Z3u"/&gt;
                              &lt;constraint firstItem="5o5-83-KbW" firstAttribute="top" secondItem="w9e-4U-cwC" secondAttribute="top" constant="128" id="UTG-NS-bx4"/&gt;
                              &lt;constraint firstItem="SuD-JI-L2T" firstAttribute="top" secondItem="w9e-4U-cwC" secondAttribute="top" constant="20" symbolic="YES" type="default" id="iaC-Ex-EBa"/&gt;
                              &lt;constraint firstItem="SuD-JI-L2T" firstAttribute="centerX" secondItem="w9e-4U-cwC" secondAttribute="centerX" type="default" id="oWP-Gp-Pi5"/&gt;
                              &lt;constraint firstItem="4Fi-NX-kli" firstAttribute="leading" secondItem="NeI-zB-U8Y" secondAttribute="leading" type="default" id="oxE-WD-fVc"/&gt;
                          &lt;/constraints&gt;
                          &lt;connections&gt;
                              &lt;outlet property="fldPassword" destination="4Fi-NX-kli" id="4eb-YW-8YI"/&gt;
                              &lt;outlet property="fldUsername" destination="NeI-zB-U8Y" id="Ds4-XS-iqW"/&gt;
                          &lt;/connections&gt;
                      &lt;/view&gt;
                      &lt;simulatedNavigationBarMetrics key="simulatedTopBarMetrics" prompted="NO"/&gt;
                  &lt;/viewController&gt;
                  &lt;placeholder placeholderIdentifier="IBFirstResponder" id="FL3-Yk-JbH" userLabel="First Responder" sceneMemberID="firstResponder"/&gt;
              &lt;/objects&gt;
              &lt;point key="canvasLocation" x="-84" y="-349"/&gt;
          &lt;/scene&gt;
          &lt;!--Navigation Controller--&gt;
          &lt;scene sceneID="fJ6-wq-4Tj"&gt;
              &lt;objects&gt;
                  &lt;navigationController id="A8c-eR-geg" sceneMemberID="viewController"&gt;
                      &lt;toolbarItems/&gt;
                      &lt;navigationBar key="navigationBar" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" id="bnk-dD-E4j"&gt;
                          &lt;rect key="frame" x="0.0" y="0.0" width="320" height="44"/&gt;
                          &lt;autoresizingMask key="autoresizingMask"/&gt;
                      &lt;/navigationBar&gt;
                      &lt;nil name="viewControllers"/&gt;
                      &lt;connections&gt;
                          &lt;segue destination="T0P-Bi-31w" kind="relationship" relationship="rootViewController" id="3jA-WY-c3V"/&gt;
                      &lt;/connections&gt;
                  &lt;/navigationController&gt;
                  &lt;placeholder placeholderIdentifier="IBFirstResponder" id="lTO-TW-owb" userLabel="First Responder" sceneMemberID="firstResponder"/&gt;
              &lt;/objects&gt;
              &lt;point key="canvasLocation" x="-971" y="-910"/&gt;
          &lt;/scene&gt;
      &lt;/scenes&gt;
      &lt;classes&gt;
          &lt;class className="LoginScreen" superclassName="UIViewController"&gt;
              &lt;source key="sourceIdentifier" type="project" relativePath="./Classes/LoginScreen.h"/&gt;
              &lt;relationships&gt;
                  &lt;relationship kind="action" name="btnLoginRegisterTapped:"/&gt;
                  &lt;relationship kind="outlet" name="fldPassword" candidateClass="UITextField"/&gt;
                  &lt;relationship kind="outlet" name="fldUsername" candidateClass="UITextField"/&gt;
              &lt;/relationships&gt;
          &lt;/class&gt;
          &lt;class className="NSLayoutConstraint" superclassName="NSObject"&gt;
              &lt;source key="sourceIdentifier" type="project" relativePath="./Classes/NSLayoutConstraint.h"/&gt;
          &lt;/class&gt;
          &lt;class className="TicketsView" superclassName="UIViewController"&gt;
              &lt;source key="sourceIdentifier" type="project" relativePath="./Classes/TicketsView.h"/&gt;
          &lt;/class&gt;
      &lt;/classes&gt;
      &lt;simulatedMetricsContainer key="defaultSimulatedMetrics"&gt;
          &lt;simulatedStatusBarMetrics key="statusBar"/&gt;
          &lt;simulatedOrientationMetrics key="orientation"/&gt;
          &lt;simulatedScreenMetrics key="destination" type="retina4"/&gt;
      &lt;/simulatedMetricsContainer&gt;
  &lt;/document&gt;
  </code></pre>