Je suis ce [blog] [1], pour passer des données d'une cellule personnalisée dans une vue de table à un contrôleur de vue. La cellule personnalisée reçoit des données de la réponse et je dois en montrer certaines dans la cellule personnalisée et le reste des données dans le contrôleur de vue détaillée. Quelqu'un peut-il identifier où le problème vient dans mon code? transmettre des données de segue.Passage des données de la cellule tableview personnalisée au contrôleur UIView
- (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];
}
}
C'est l'erreur à laquelle je suis confronté lorsque je clique sur une cellule.
en raison de l'application Mettre fin exception uncaught 'NSUnknownKeyException', raison: '[ setValue: forUndefinedKey:]: cette classe n'est pas valeur de clé de codage conforme pour l'id clé.' Pile d'appel du premier jet:
Ceci est mon fichier ShowViewcontroller.h.
a changé le code.
Quelle est votre sortie courant? –
Comment déclarez-vous Idss dans ShowViewController? –
donné aléatoirement un nom pour accéder à la valeur. @AravindAR –