3
votes

I am getting this exception:

2012-10-11 14:27:05.039 SunriseAlarm[2297:907] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[PickerViewController _setViewDelegate:]: unrecognized selector sent to instance 0x1e56fff0'

I have this code in the appDelegate.m file

PickerViewController *pvc = [[PickerViewController alloc] initWithNibName:@"PickerView" bundle:nil];

self.window.rootViewController = pvc;

I have already set the class of the nib to the custom class and it is not UIViewController. Please see image below.

Here is the image of XCode window

Please let me know what do you think I am doing wrong.

Thank You,

Venkat Rao

1

1 Answers

15
votes

You did set PickerViewController class for UIView, it's not correct, return back and set PickerViewController for File's owner