title: Custom TableViewCell - this class is not key value coding-compliant for the key
body: <p>Im trying to use my custom cell but it doesnt work.</p>
  
  <p>Here's the error:</p>
  
  <pre><code>*** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[&lt;UITableViewCell 0x12ce3dcf0&gt; setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key anmerkungLabel.'
  *** First throw call stack:
  (0x182fb259c 0x1937080e4 0x182fb2220 0x183dbdb10 0x187a305d0 0x182edf3c0 0x187b6f83c 0x1878a28dc 0x10003d77c 0x187a5aef0 0x187a4faa4 0x187844ce8 0x187761648 0x1870b9994 0x1870b4564 0x187775a2c 0x18789c194 0x18789b61c 0x18789b304 0x187964ed8 0x187798d34 0x187964d44 0x187798d34 0x187781e48 0x18796497c 0x187798d34 0x187781e48 0x1877986d0 0x18779835c 0x1877918b0 0x187764fa8 0x187a03f58 0x187763510 0x182f6a9ec 0x182f69c90 0x182f67d40 0x182e950a4 0x18c0375a4 0x1877ca3c0 0x100058498 0x193d76a08)
  libc++abi.dylib: terminating with uncaught exception of type NSException
  (lldb) 
  </code></pre>
  
  <p>My cell is called: <code>VertretungsCell</code></p>
  
  <p>VertretungsCell.h:</p>
  
  <pre><code>#import &lt;UIKit/UIKit.h&gt;
  
  @interface VertretungsCell : UITableViewCell
  @property (weak, nonatomic) IBOutlet UILabel *stundeLabel;
  @property (weak, nonatomic) IBOutlet UILabel *stattLabel;
  @property (weak, nonatomic) IBOutlet UILabel *fachLabel;
  @property (weak, nonatomic) IBOutlet UILabel *raumLabel;
  @property (weak, nonatomic) IBOutlet UILabel *anmerkungLabel;
  
  @end
  </code></pre>
  
  <p>VertretungsCell.h:</p>
  
  <pre><code>#import "VertretungsCell.h"
  
  @implementation VertretungsCell
  @synthesize stundeLabel,stattLabel,fachLabel,raumLabel,anmerkungLabel;
  
  - (void)awakeFromNib {
      // Initialization code
  }
  
  - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
      [super setSelected:selected animated:animated];
  
      // Configure the view for the selected state
  }
  
  @end
  </code></pre>
  
  <p>The ViewController is called: <code>Vertretungsplan</code></p>
  
  <p>Vertretungsplan.h:</p>
  
  <pre><code>#import &lt;UIKit/UIKit.h&gt;
  
  @interface Vertretungsplan : UIViewController &lt;UITableViewDataSource,UITableViewDelegate&gt;
  
  @property (weak, nonatomic) IBOutlet UITableView *vertretungsplanTableView;
  
  @end
  </code></pre>
  
  <p>Vertreutungsplan.m:</p>
  
  <pre><code>#import "Vertretungsplan.h"
  #import "VertretungsCell.h"
  
  @interface Vertretungsplan ()
  
  @end
  
  @implementation Vertretungsplan {
      NSMutableArray *stunde;
      NSMutableArray *statt;
      NSMutableArray *fach;
      NSMutableArray *raum;
      NSMutableArray *anmerkung;
  }
  
  - (void)viewDidLoad {
      [super viewDidLoad];
      stunde = [[NSMutableArray alloc] initWithArray:[NSArray arrayWithObjects: @"1",@"2",@"3", nil]];
      statt = [[NSMutableArray alloc] initWithArray:[NSArray arrayWithObjects: @"D1",@"E2",@"M3", nil]];
      fach = [[NSMutableArray alloc] initWithArray:[NSArray arrayWithObjects: @"CH1",@"PP2",@"SP3", nil]];
      raum = [[NSMutableArray alloc] initWithArray:[NSArray arrayWithObjects: @"111",@"222",@"333", nil]];
      anmerkung = [[NSMutableArray alloc] initWithArray:[NSArray arrayWithObjects: @"EVA",@"1. fällt aus",@"EVA", nil]];
  }
  
  - (void)didReceiveMemoryWarning {
      [super didReceiveMemoryWarning];
      // Dispose of any resources that can be recreated.
  }
  
  - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
      return stunde.count;
  }
  
  - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
  
      static NSString *CellIdentifier = @"Cell";
  
      UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
      if (cell == nil) {
          cell = [[VertretungsCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
      }
  
      VertretungsCell *vertretungsCell = (VertretungsCell *)cell;
  
      vertretungsCell.stundeLabel.text = stunde[indexPath.row];
      vertretungsCell.stattLabel.text = statt[indexPath.row];
      vertretungsCell.fachLabel.text = fach[indexPath.row];
      vertretungsCell.raumLabel.text = raum[indexPath.row];
      vertretungsCell.anmerkungLabel.text = anmerkung[indexPath.row];
  
      return cell;
  }
  
  @end
  </code></pre>
  
  <p>Here are some screenshots: (may help)</p>
  
  <p><img src="https://i.stack.imgur.com/kJXIv.png" alt="Aspect">
  <img src="https://i.stack.imgur.com/zPhFr.png" alt="Cell">
  <img src="https://i.stack.imgur.com/25QvY.png" alt="Identity"></p>