title: Data Passing from Custom Table View Controller to a View Controller
body: <p>I have made a custom table view controller in which there are some labels which are taking values from an API response. Some of the values are shown in custom table view , i have another view controller called Detail vc , in which i want to show the detail of the data i'm getting from API. I'm passing the data from custom table to detail vc through segue but i'm facing an error, i don't know where is the problem coming . I had used the same method to pass data from one vc to another vc there it was working fine, but i don't know why it is not working here. The error is,</p>
  
  <blockquote>
    <p>2017-07-11 15:57:22.177 PK.House[9403:604414] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[StringData length]: unrecognized selector sent to instance 0x60800012b400'</p>
  </blockquote>
  
  <p>My code for segue is,</p>
  
  <pre><code>- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
      if ([segue.identifier isEqualToString:@"ShowDetail"]) {
          //Do something
          NSIndexPath *indexPath = [self.tableView indexPathForSelectedRow];
          ShowViewController *destViewController = segue.destinationViewController;
           destViewController.tites = [_Title objectAtIndex:indexPath.row];
           destViewController.prce = [_Price objectAtIndex:indexPath.row];
           destViewController.ara = [_LandArea objectAtIndex:indexPath.row];
           destViewController.phon = [_Phone objectAtIndex:indexPath.row];
          // destViewController.citi = [_City objectAtIndex:indexPath.row];
           destViewController.loc = [_location objectAtIndex:indexPath.row];
          // destViewController.tye = [_type objectAtIndex:indexPath.row];
          // destViewController.Idss = [_Id objectAtIndex:indexPath.row];
           destViewController.nam = [_name objectAtIndex:indexPath.row];
           destViewController.emal = [_email objectAtIndex:indexPath.row];
           destViewController.roomss = [_rooms objectAtIndex:indexPath.row];
           destViewController.wash = [_washroom objectAtIndex:indexPath.row];
           destViewController.flloors = [_floor objectAtIndex:indexPath.row];
           //destViewController.stat = [_status objectAtIndex:indexPath.row];
           destViewController.descrp = [_descrip objectAtIndex:indexPath.row];
          // destViewController.countryy = [_country objectAtIndex:indexPath.row];
  
      }
  }
  </code></pre>
  
  <p>Detail vc is,</p>
  
  <pre><code>- (void)viewDidLoad {
      [super viewDidLoad];
  
      UIBarButtonItem *backButton = [[UIBarButtonItem alloc]
                                     initWithTitle:@"BACK"
                                     style:UIBarButtonItemStyleDone
                                     target:self
                                     action:@selector(backBtnClicked)];
      self.navigationItem.leftBarButtonItem = backButton;
      backButton.tintColor=[UIColor whiteColor];
  
     /* int x=0;
      NSArray *image=[[NSArray alloc]initWithObjects:@"city.png",@"area.png",@"twitter.png", nil];
      for (int i=0; i&lt;image.count; i++)
      {
          UIImageView *img=[[UIImageView alloc]initWithFrame:CGRectMake(x, 0,[[UIScreen mainScreen] bounds].size.width,[[UIScreen mainScreen] bounds].size.height)];
          img.image=[UIImage imageNamed:[image objectAtIndex:i]];
          x=x+[[UIScreen mainScreen] bounds].size.width;
  
      }*/
  
      self.Title.text = _tites;
      self.name.text = _nam;
      self.email.text = _emal;
      self.status.text = _stat;
      self.type.text = _tye;
      self.phone.text = _phon;
      self.rooms.text = _roomss;
      self.floor.text = _flloors;
      self.washroom.text = _wash;
      self.location.text = _loc;
      self.Descrip.text = _descrp;
      self.city.text = _citi;
      self.country.text = _countryy;
      self.propid.text = Idss;
  
  
      // Do any additional setup after loading the view.
  }
  </code></pre>