I am having a problem during run-time that says
-[__NSCFString _isResizable]: unrecognized selector sent to instance 0x6a86a80 2012-10-24 14:21:08.070 Diabetic Food Guide[767:c07] * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString _isResizable]: unrecognized selector sent to instance 0x6a86a80'
I think the problem lies in these parts of the code:
/*ViewControllerManual.m*/
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
NSDictionary* tier = (NSDictionary*)sender;
if ([segue.identifier isEqualToString:@"loopbackSegue"]) {
ViewControllerManual* nextController = segue.destinationViewController;
nextController.items = [tier objectForKey:@"items"];
nextController.title = [tier objectForKey:@"name"];
} else if ([segue.identifier isEqualToString:@"detailSegue"]) {
DetailsController* nextController = segue.destinationViewController;
nextController.name = [tier objectForKey:@"name"];
nextController.foodPicture = [tier objectForKey:@"foodPicture"];
nextController.tablePicture = [tier objectForKey:@"tablePicture"];
}
}
/*DetailsController.m*/
- (void)viewDidLoad {
[super viewDidLoad];
nameLbl.text = self.name;
foodPic.image = self.foodPicture;
tablePic.image = self.tablePicture;
}
foodPic and tablePic are both UIImageViews, and foodPic is set using cell.imageView.image = [UIImage imageNamed:[[self.items objectAtIndex:indexPath.row] objectForKey:@"foodPicture"]];
which calls from an array that contains the paths to the images. The error only occurs when loading a view of the class DetailsController.
If I need to supply more info, please don't hesitate to tell me.
Seems you're returning NSStrings here:
And then
Or you've over released something. But from your description it's more likely the issue with assigning NSString to an UIImage.