Can't cast value of type UIViewController to PatternDetailViewController

前端 未结 8 1615
孤街浪徒
孤街浪徒 2020-12-06 04:29

Am trying to downcast a view controller to a detail view controller but can\'t. Am using Core Data (for the first time). The error is in the prepareForSegue method and reads

8条回答
  •  無奈伤痛
    2020-12-06 05:00

    Adding to matt answer. Sometimes, you may also need to double check the custom class Module from the Identity inspector.

    Your view controller need to belong to a specific Module. So make sure to select a Module from the list. In my case:

提交回复
热议问题