Error: unreachable because it has no entry points

后端 未结 12 1192
小蘑菇
小蘑菇 2021-02-03 20:15

Using Swift I got the error that my \"TableViewController\" is unreachable because it has no entry points and no runtime access via [UIStoryboard instantiateViewControllerWithId

相关标签:
12条回答
  • 2021-02-03 20:50

    When you have 2 or more navigation controllers(embedded UIVIewcontrollers) or 2 or more UIViewcontrollers in your storyboard. Xcode may be looking for a startup view controller. You can mark either of one of them as startupviewcontroller, just by selecting the "is initial viewcontroller"

    OR you can give a unique storyboard id for each and every UInavigationcontrollers or UIViewcontrollers or UITabviewcontrollers in your storyboard.

    0 讨论(0)
  • 2021-02-03 20:54

    For me I just had a view controller that wasn't attached to anything, i.e. I had a UITabBar Controller, and a few View Controllers attached to the TabBar, but there was one View Controller that was stranded, with out any connection to another view.

    From my experience, the error message was,

    “View Controller“ is unreachable because it has no entry points, and no identifier for runtime access via -[UIStoryboard instantiateViewControllerWithIdentifier:].

    The View controller name was the text in quotes, i.e. “View Controller“.

    Hope this helped someone!

    0 讨论(0)
  • 2021-02-03 20:55

    I had same issue that to solve this problem I opened the Document Outline then realized that I have accidentally deleted the Segue between two pages.

    Steps:

    1) Editor> Show Document Outline document outline

    2) Check the Document Outline for any copy-paste, segue error or etc. screenshot

    0 讨论(0)
  • 2021-02-03 20:59

    I'd reached the same error. This answer would be useful, I think: Xcode: "Scene is unreachable due to lack of entry points" but can't find it

    The problem was that because of some experiments and copy-pasting I had an actual copy of a view controller located outside the visible part of the screen or it could be stacked exactly on top of its twin. So I just deleted unwanted one :-) You should open Document Outline and сheck for copies :-)

    0 讨论(0)
  • 2021-02-03 20:59

    Just add an ID in Storyboard ID (and restoration ID in case)

    0 讨论(0)
  • 2021-02-03 20:59

    The problem is exactly as the warning says: this View Controller is unreachable because it has no entry points.

    If you have only one View Controller then this controller is missing its entry point. You can fix this by setting this View Controller as "Is Initial View Controller".

    If you have several View Controllers and this View Controller is not in the beginning of your storyboard sequence, then you are missing a segue which should display this View Controller. You can fix this by adding a segue which should show this View Controller.

    In general, Xcode tells you that this View Controller is not connected to the storyboard sequence because it has no incoming connections.

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