1
當我嘗試點擊我的應用程序中的segueway時,出現以下調試消息。無法識別的選擇器發送到實例setDetailModal
"SmokingPig[13840:c07] -[UIViewController setDetailModal:]: unrecognized selector sent to instance 0x75836c0"
這是我TableViewController.m文件(或我認爲部分至少搞砸)
-(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
if ([[segue identifier] isEqualToString:@"ShowDetails"]) {
DetailViewController *detailviewcontroller = [segue destinationViewController];
NSIndexPath *myIndexPath = [self.tableView indexPathForSelectedRow];
int row = [myIndexPath row];
detailviewcontroller.DetailModal = @[_Title[row], _Description[row]];
}
這是我DetailViewController.h文件 #進口
@interface DetailViewController : UIViewController
@property (strong, nonatomic) IBOutlet UILabel *TitleLabel;
@property (strong, nonatomic) IBOutlet UILabel *DescriptionLabel;
@property (strong, nonatomic) NSArray *DetailModal;
@end