title: Unknown class PlayerDetailsViewController in Interface Builder file
body: <p>I am following <a href="https://www.raywenderlich.com/50310/storyboards-tutorial-in-ios-7-part-2" rel="nofollow noreferrer">this tutorial</a>, and the App was working fine till i started implementing the delegate method.</p>
  
  <p>please have a look at the classes "ViewController" and "PlayerDetailsViewController"</p>
  
  <p>the error i am getting when I click either "Cancel" or "Done" button is, </p>
  
  <p><strong>error</strong>:</p>
  
  <pre><code>2017-06-01 13:55:47.620 Segue-1[3437:138735] Unknown class  
  PlayerDetailsViewController in Interface Builder file.
  2017-06-01 13:55:48.716 Segue-1[3437:138735] -[UITableViewController     
  cancel:]: unrecognized selector sent to instance 0x7a85c0d0
  
  2017-06-01 13:55:48.720 Segue-1[3437:138735] *** Terminating app due   
  to uncaught exception 'NSInvalidArgumentException', reason: '-   
  [UITableViewController cancel:]: unrecognized selector sent to  
   instance 0x7a85c0d0'
  </code></pre>
  
  <p>** ViewController.h**:</p>
  
  <pre><code>#import &lt;UIKit/UIKit.h&gt;
  
  @interface ViewController : UIViewController
  @end
  </code></pre>
  
  <p>** ViewController.m**:</p>
  
  <pre><code>#import "ViewController.h"
  #import "PlayerDetailsViewController.h"
  
  @interface ViewController ()
  
  @end
  
  @implementation ViewController
  
  - (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a     
  nib.
  }
  
  - (void)didReceiveMemoryWarning {
     [super didReceiveMemoryWarning];
     // Dispose of any resources that can be recreated.
  }
  
   #pragma mark - PlayerDetailsViewControllerDelegate
  
  - (void)playerDetailsViewControllerDidCancel:   
  (PlayerDetailsViewController *)controller
  {
     [self dismissViewControllerAnimated:YES completion:nil];
   }
  
   - (void)playerDetailsViewControllerDidSave:   
   (PlayerDetailsViewController *)controller
   {
       [self dismissViewControllerAnimated:YES completion:nil];
   }
  
  
   @end
  </code></pre>
  
  <p><strong>PlayerDetailsViewController.h</strong>:</p>
  
  <pre><code>#import &lt;UIKit/UIKit.h&gt;
  @class PlayerDetailsViewController;
  
  @protocol PlayerDetailsViewControllerDelegate &lt;NSObject&gt;
  - (void)playerDetailsViewControllerDidCancel:  
  (PlayerDetailsViewController *)controller;
   - (void)playerDetailsViewControllerDidSave: 
  (PlayerDetailsViewController   
   *)controller;
   @end
  
  @interface PlayerDetailsViewController : UITableViewController
  
  @property (nonatomic, weak) id &lt;PlayerDetailsViewControllerDelegate&gt;   
  delegate;
  
  - (IBAction)cancel:(id)sender;
  - (IBAction)done:(id)sender;
  
  @end
  </code></pre>
  
  <p><strong>PlayerDetailsViewController.m</strong>:</p>
  
  <pre><code>#import "PlayerDetailsViewController.h"
  
  @interface PlayerDetailsViewController ()
  
  @end
  
  @implementation PlayerDetailsViewController
  
   - (void)viewDidLoad {
    [super viewDidLoad];
  
   // Uncomment the following line to preserve selection between   
   presentations.
   // self.clearsSelectionOnViewWillAppear = NO;
  
   // Uncomment the following line to display an Edit button in the 
   navigation bar for this view controller.
   // self.navigationItem.rightBarButtonItem = self.editButtonItem;
   }
  
   - (void)didReceiveMemoryWarning {
       [super didReceiveMemoryWarning];
       // Dispose of any resources that can be recreated.
   }
  
   - (IBAction)cancel:(id)sender
   {
      [self.delegate playerDetailsViewControllerDidCancel:self];
   }
  
   - (IBAction)done:(id)sender
   {
       [self.delegate playerDetailsViewControllerDidSave:self];
   }
  
   #pragma mark - Table view data source
  
   - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
   #warning Incomplete implementation, return the number of sections
      return 0;
   }
  
   - (NSInteger)tableView:(UITableView *)tableView   
   numberOfRowsInSection:(NSInteger)section {
   return 1;
   }
  </code></pre>
  
  <p><strong>update section</strong></p>
  
  <p>UPDATE SECTION</p>
  
  <p>//the below code is added to ViewController.m</p>
  
  <pre><code>     - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:  
        (id)sender
         {
          if ([segue.identifier isEqualToString:@"AddPlayer"]) {
  
         UINavigationController *navigationController =   
         segue.destinationViewController;
         PlayerDetailsViewController *playerDetailsViewController = 
          [navigationController viewControllers][0];
          playerDetailsViewController.delegate = self;
         }
        }
  </code></pre>