Unrecognized Selector Sent to Instance UIViewController

后端 未结 2 1817
南旧
南旧 2021-01-12 23:58

I keep getting the error:

NSInvalidArgumentException\', reason: \'-[UIViewController setPhotoCellName:]: unrecognized selector sent to instance

相关标签:
2条回答
  • 2021-01-13 00:05

    It sounds like you've accidentally got a plain vanilla UIViewController rather than a FlickrImageViewController. Maybe you forgot to assign the controller's class?

    0 讨论(0)
  • 2021-01-13 00:08

    You believe that your destination is an object from the FlickrImageViewController but the app doesn't. Look at the class you have assigned that controller in your storyboard; according to the error, it's a bare UIViewController.

    0 讨论(0)
提交回复
热议问题