0

我收到以下错误

[UIViewController setThisViewData:]: unrecognized selector sent to instance 0x71800b0
2012-10-24 16:06:05.071 Movie Rental[5468:c07] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIViewController setThisViewData:]: unrecognized selector sent to instance 0x71800b0'

在“ basicInfoViewController.m ”的以下行:

 contactInfoViewController *destViewController = segue.destinationViewController;
 destViewController.thisViewData = [[NSMutableDictionary alloc] initWithDictionary:self.viewData];

我的contactInfoViewController.h看起来像

@interface contactInfoViewController : UIViewController
{
    NSMutableDictionary *thisViewData;
}
@property(nonatomic, strong) NSMutableDictionary *thisViewData;

我已经包括了

@synthesize thisViewData;

为实施。为什么我会收到此错误?

4

1 回答 1

1

看起来您还没有在界面构建器中为 UIViewController 设置类,因此您没有获得 contactInfoViewController,而是获得了 UIViewController。

于 2012-10-24T10:56:47.120 回答