title: Error on app launch: Foundation.MonoTouchException: Objective-C exception thrown (Xamarin iOS)
body: <p>I get this error message when launching my app:</p>
  
  <blockquote>
    <p>Foundation.MonoTouchException: Objective-C exception thrown.  Name:
    NSInvalidArgumentException Reason: -[TableSource initWithCoder:]:
    unrecognized selector sent to instance 0x796e6fa0</p>
  </blockquote>
  
  <p>I already searched on google, but didn't find a solution. </p>
  
  <p>About the app: The App has a UITableView with some custom cells. The UITableView is on a normal "view". Theres also a Button on the normal "view", this button should (when touched) add a custom cell to the UITableView. </p>
  
  <p>The UITableView has the name "tableView" and in properties at class "TableSource". The Button has the name "btn01" and in properties as class "ViewController". </p>
  
  <p>The custom cells have as "reuse identifier" "Cell01Reuse", "Cell02Reuse", etc. And as class "Testclass" (which doesnt exist as a file). </p>
  
  <p>The View Controller (the base, where everything is on) has "ViewController" as class. </p>
  
  <p>I have two classes with code. First is "View Controller":</p>
  
  <pre><code>using System;
  using UIKit;
  using Foundation;
  using System.Collections.Generic;
  
  namespace myapp
  {
      public partial class ViewController : UIViewController
      {
          public ViewController(IntPtr handle) : base(handle)
          {
          }
  
          public override void ViewDidLoad()
          {
              base.ViewDidLoad();
  
              // Perform any additional setup after loading the view, typically from a nib.
  
              //UITableView _table;
              //_table = new UITableView
              //{
              //    Frame = new CoreGraphics.CGRect(0, View.Bounds.Height * 0.03, View.Bounds.Width, View.Bounds.Height * 0.80),
              //    Source = new TableSource(null)
              //};
              //_table.SeparatorStyle = UITableViewCellSeparatorStyle.None;
              //View.AddSubview(_table);
  
              TableSource TS = new TableSource();
  
              btn01.TouchUpInside += (sender, e) =&gt;
              {
                  TS.updateTableView();
                  string cell01 = "Cell01Reuse";
                  TS.tableItems.Add(cell01);
              };
          }
  
          public override void DidReceiveMemoryWarning()
          {
              base.DidReceiveMemoryWarning();
              // Release any cached data, images, etc that aren't in use.
          }
      }
  }
  </code></pre>
  
  <p>Second is "TableSource":</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Text;
  using Foundation;
  using UIKit;
  
  namespace myapp
  {
      public partial class TableSource : UITableViewSource
      {
  
  
  
          //string[] tableItems;
          public List&lt;string&gt; tableItems = new List&lt;string&gt;();
          public static string cellIdentifier = "TableCell";
  
          //public TableSource(string[] items)
          //{
          //    tableItems = items;
          //}
  
          public TableSource()
          {
          }
  
          public override nint RowsInSection(UITableView tableview, nint section)
          {
              return 0;
          }
  
          public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath)
          {
              UITableViewCell cell = tableView.DequeueReusableCell(cellIdentifier);
              if (cell == null)
              {
                  cell = new UITableViewCell(UITableViewCellStyle.Default, cellIdentifier);
              }
              cell.TextLabel.Text = tableItems[indexPath.Row];
              tableItems.Add(Convert.ToString(cell));
              return cell;
          }
  
          public override nint NumberOfSections(UITableView tableView)
          {
              return base.NumberOfSections(tableView);
          }
  
          public override void RowSelected(UITableView tableView, NSIndexPath indexPath)
          {
              new UIAlertView("Alert", "You touched: " + tableItems[indexPath.Row], null, "OK", null).Show();
              tableView.DeselectRow(indexPath, true);
          }
  
          public void updateTableView()
          {
              tableView.updateTableView();
          }
      }
  }
  </code></pre>