I have an iPad app with a main ViewController, and inside of it I have a UIButton. This is tied to a segue with style Popover with a target that is a UIPopoverController class (empty, from Xcode's 'create new' with UIPopoverController subclass).
When I click the button, the segue executes, and it crashes:
2012-12-22 16:58:57.275 iAmFrustratedApp[11521:c07] -[MyGreatPopoverController initWithCoder:]: unrecognized selector sent to instance 0x1caabe70
2012-12-22 16:58:57.277 iAmFrustratedApp[11521:c07] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[MyGreatPopoverController initWithCoder:]: unrecognized selector sent to instance 0x1caabe70'
*** First throw call stack:
(0x22fe012 0x148fe7e 0x23894bd 0x22edbbc 0x22ed94e 0x5f3ae9 0x702a02 0x7020e5 0x5f367b 0x702a02 0x702418 0x7020e5 0x5f2aa3 0x81e48a 0x81ea83 0x81eb54 0x14a3705 0x3da920 0x3da8b8 0x49b671 0x49bbcf 0x49ad38 0x40a33f 0x40a552 0x3e83aa 0x3d9cf8 0x1bacdf9 0x2281f3f 0x228196f 0x22a4734 0x22a3f44 0x22a3e1b 0x1bab7e3 0x1bab668 0x3d765c 0x1cbd 0x1be5)
libc++abi.dylib: terminate called throwing an exception
Interestingly, I used to have this target be a normal UIViewController. When it was that class, this worked properly, except that I couldn't dismiss the popover programmatically in any way. That's the only reason I switched the target class to be UIPopoverController.
MyGreatPopoverController
in the Storyboard. UIPopoverController does not conform to NSCoding – CodaFi