objective c - Unrecognized selector sent to instance and crash in main.m in iOS application -


hi cannot understand i'm searching help. here is... i'm working on storyboard ios , during prepareforsegue method trying set property of viewcontroller loaded.

right here crash pointing @ center line of main.m , here message:

*** terminating app due uncaught exception 'nsinvalidargumentexception', reason: '-[uitableviewcontroller setdetails:]: unrecognized selector sent instance 0x8880b80' 

here method prepareforsegue ended looking mistakes following exception:

- (void) prepareforsegue:(uistoryboardsegue *)segue sender:(id)sender { if ([[segue identifier] isequaltostring: @"cellsegue"])   {     apptestdetailviewcontroller *detailviewcontroller = [segue destinationviewcontroller];     nsindexpath *indexpath = [self.tableview indexpathforselectedrow];     detailviewcontroller.details = self.detailslist[indexpath.row];   } } 

well.. self.detailslist nothing array of details items. details property declared in apptestdetailviewcontroller.h this

#import <uikit/uikit.h> #import "details.h" #import "detailcell.h"   @interface apptestdetailviewcontroller : uitableviewcontroller  @property (strong, nonatomic) details *details;  @end 

so... can't understand problem setting property. i'm missing something... hope clear , lot help!

the error message

-[uitableviewcontroller setdetails:]: unrecognized selector ... 

shows detailviewcontroller not instance of apptestdetailviewcontroller expect, "only" uitableviewcontroller.

one possible reason did not set "custom class" controller in storyboard file.


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -