title: NSArrayM tableView]: unrecognized selector
body: <p>I have two days trapped  because  do not work my NSArray.</p>
  
  <p>when I run the application  everything works well  but when I touch searchBar  the application is closed  reason: '- [__NSArrayM tableView]: unrecognized selector sent to instance 0x16e34c50'</p>
  
  <pre><code>@implementation ViewController
  
  
  -(BOOL)prefersStatusBarHidden
  {
  return YES;
  }
  - (void)viewDidLoad
  
  {
  [super viewDidLoad];
  
  monthArray = [[ NSMutableArray alloc] initWithObjects:@"Paliwizumab",@"Opis przedmiotu zamówienia",@"Paliwizumab a 0,1g inj I.M ( proszek + rozpuszczalnik)",@"Paliwizumab a 0,05 g I.M ( proszek + rozpuszczalnik )",@"Nazwa międzynarodowa",@"PALIVISUMABUM*",@"Paliwizumab01",@"Paliwizumab02",@"Paliwizumab03",@"Paliwizumab04",@"Paliwizumab05",@"Paliwizumab06", nil];
  
  
  [searchBar setParentController:self];
  [searchBar setParentController:monthArray];
  [searchBar setDelegate:searchBar];
  
  
  [self prefersStatusBarHidden];
  
  }
  -(void) viewDidAppear:(BOOL)animated{
  [super viewDidAppear:animated];
  [[NSNotificationCenter defaultCenter] addObserver:searchBar selector:@selector(keyboardWillShow:) name:          (UIKeyboardWillShowNotification ) object:nil];
  }
  
  -(void)viewDidDisappear:(BOOL)animated
  
  [super viewDidDisappear:animated];
  [[NSNotificationCenter defaultCenter] removeObserver:searchBar];
  }
  
  -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
  {
  return [[self monthArray]count];
  
  }   
  
  
  -(NSMutableArray*)monthArray
  {
  if (searchBar.isSearching == 1)
      return  searchBar.searchArray;
  
  else
      return  monthArray;
  }
  
  -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
  {
  
  static NSString *CellId = @"CellId";
  UITableViewCell *cell = [self-&gt;_tableView dequeueReusableCellWithIdentifier:CellId];
  if (! cell)
      cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellId];
  [cell.textLabel setText:[[self monthArray] objectAtIndex:indexPath. row]];
  return cell;
  
  }
  
  
  
  @end
  </code></pre>
  
  <p>ViewController.h</p>
  
  <pre><code>#import &lt;UIKit/UIKit.h&gt;
  #import "JPSearchBar.h"
  
  @interface ViewController : UIViewController&lt;UITableViewDelegate&gt;
  
   {
  NSMutableArray       *monthArray;
  IBOutlet JPSearchBar *searchBar;
  }
  
  
  @property (strong, nonatomic) IBOutlet UITableView *tableView;
  
  -(NSMutableArray*)monthArray;
  
  
  @end
  </code></pre>