У меня возникает следующая ошибка при попытке установить строку в публичном свойстве в режиме подготовки к segue. Любая идея почему?Ошибка при настройке свойства в prepareForSegue:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIViewController setQuestionObjectId:]: unrecognized selector sent to instance 0x7fa713562b40'
Код:
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
if ([[segue identifier] isEqualToString:@"postSegue"]) {
CommentsViewControllerNew *commentsVC = (CommentsViewControllerNew *)[segue destinationViewController];
commentsVC.hidesBottomBarWhenPushed = YES;
PFObject * question=[self.brightenArray objectAtIndex:self.indexPathOfClickedpost.row];
commentsVC.questionObjectId=question.objectId;
NSLog(@"%@",[self.Array objectAtIndex:self.indexPathOfClickedpost.row]);
// commentsVC.question = question;
Пожалуйста, покажите свой код 'CommentsViewControllerNew', чтобы мы могли увидеть ваш вопрос @property. –