title: empty nsarray crashes uitableview
body: <p>I am catching a bunch of data from my server then parsing it, I then pass this parsed data over to a method that sorts my array alphabetically.. all of this is working but my tableview is displaying before I have any data in the array so my app is falling over... how can I stop this from happening?</p>
  
  <pre><code>//...
  tableView:cellForRowAtIndexPath:
  //..
  //configure cell
  [[cell textLabel] setText:[sortedArray objectAtIndex:[indexPath row]]]; // this is where I am passing the data into each cell
  ///
  
  //parsing stuff happens here then I passed the parsed data over to my sorting method...
  
  
  //method to sort array and split for use with uitableview Index
  - (IBAction)startSortingTheArray:(NSMutableArray *)arrayData
  {
      //Sort incoming array alphabetically
      sortedArray = [arrayData sortedArrayUsingSelector:@selector(localizedCaseInsensitiveCompare:)];
  
      //Reloads data in table
      [self.tableView reloadData];
  }
  </code></pre>
  
  <p>error msg</p>
  
  <pre><code>2011-09-16 15:04:06.096 Code[8630:207] -[UILabel objectAtIndex:]: unrecognized selector sent to instance 0x4c767e0
  2011-09-16 15:04:06.099 Code[8630:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UILabel objectAtIndex:]: unrecognized selector sent to instance 0x4c767e0'
  *** Call stack at first throw:
  (
      0   CoreFoundation                      0x010da5a9 __exceptionPreprocess + 185
      1   libobjc.A.dylib                     0x0122e313 objc_exception_throw + 44
      2   CoreFoundation                      0x010dc0bb -[NSObject(NSObject) doesNotRecognizeSelector:] + 187
      3   CoreFoundation                      0x0104b966 ___forwarding___ + 966
      4   CoreFoundation                      0x0104b522 _CF_forwarding_prep_0 + 50
      5   Code                           0x0003d225 -[VehicleResultViewController tableView:cellForRowAtIndexPath:] + 405
      6   UIKit                               0x0063bb98 -[UITableView(UITableViewInternal) _createPreparedCellForGlobalRow:withIndexPath:] + 634
      7   UIKit                               0x006314cc -[UITableView(UITableViewInternal) _createPreparedCellForGlobalRow:] + 75
      8   UIKit                               0x006468cc -[UITableView(_UITableViewPrivate) _updateVisibleCellsNow:] + 1561
      9   UIKit                               0x0063e90c -[UITableView layoutSubviews] + 242
      10  QuartzCore                          0x01ee0a5a -[CALayer layoutSublayers] + 181
      11  QuartzCore                          0x01ee2ddc CALayerLayoutIfNeeded + 220
      12  QuartzCore                          0x01e880b4 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 310
      13  QuartzCore                          0x01e89294 _ZN2CA11Transaction6commitEv + 292
      14  QuartzCore                          0x01e8946d _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 99
      15  CoreFoundation                      0x010bb89b __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 27
      16  CoreFoundation                      0x010506e7 __CFRunLoopDoObservers + 295
      17  CoreFoundation                      0x010191d7 __CFRunLoopRun + 1575
      18  CoreFoundation                      0x01018840 CFRunLoopRunSpecific + 208
      19  CoreFoundation                      0x01018761 CFRunLoopRunInMode + 97
      20  GraphicsServices                    0x018971c4 GSEventRunModal + 217
      21  GraphicsServices                    0x01897289 GSEventRun + 115
      22  UIKit                               0x005d4c93 UIApplicationMain + 1160
      23  Code                           0x00002609 main + 121
      24  Code                           0x00002585 start + 53
  )
  terminate called after throwing an instance of 'NSException'
  </code></pre>
  
  <p>UPDATED// initializing array to 0 inside viewdidload is now giving me a "EXC_BAD_ACCESS" error</p>
  
  <pre><code>- (void)viewDidLoad
  {
      [super viewDidLoad];
      self.sortedArray = [NSArray alloc];
  }
  </code></pre>