InstantiateViewController

InstantiateViewController

本文介绍了错误:无法访问,因为它没有入口点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用Swift,我收到"TableViewController"无法访问的错误,因为它没有入口点,也没有通过[UIStoryboard InstantiateViewControllerWithIdentifier]的运行时访问.

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

在我的View Controller类中,建议在更改 instantiateViewController(withIdentifier)中的 instantiateViewController(withIdentfier ...)时进行修复.

In my View Controller class there is the suggestion to fix it while changing instantiateViewController(withIdentfier...) in instantiateViewController(withIdentifier).

我应该这样做还是如何解决?

Shall I do this or how do I fix this?

推荐答案

您需要在 Storyboard 中标记一个 viewController 并将其设置为 initial viewController.您可以在 Attributes Inspector 下进行此操作.这意味着您可以设置在启动应用程序时应打开哪个viewController.

You need to mark a viewController in your Storyboard and set it to the initial viewController. You do this under the Attributes Inspector. This means that you set which viewController shall open when you start your application.

这篇关于错误:无法访问,因为它没有入口点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-21 18:40