DBPostListViewController 有一个需要设置的 NSArray *postList。
我不断得到
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UITableViewController setPostList:]: unrecognized selector sent to instance 0x6e493d0
在 setPostList 函数的 prepareForSegue 中:
NSArray *tempAry = [str componentsSeparatedByString:@"|@|"];
NSMutableArray *postArray = [[NSMutableArray alloc] initWithCapacity:[tempAry count]];
for (NSString *entry in tempAry) {
DBPost *tempPost = [[DBPost alloc] initWithString:entry];
[postArray addObject:tempPost];
}
DBPostListViewController *dest = [segue destinationViewController];
[dest setPostList:postArray];