如果要使用主故事板文件swift,则应用程序委托必须实现window属性. [英] The app delegate must implement the window property if it wants to use a main storyboard file swift

查看:78
本文介绍了如果要使用主故事板文件swift,则应用程序委托必须实现window属性.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚开发了一个应用程序,但是在模拟器中运行时,调试器控制台会显示:

I have just developed an app, but when running in the simulator the debugger console says:

如果要使用,则应用程序委托必须实现window属性 一个主要的故事板文件.

The app delegate must implement the window property if it wants to use a main storyboard file.

我有一个应用程序委托文件.该消息是什么意思,我如何使我的应用正常工作?

I have an app delegate file. What does the message mean, and how can I get my app working?

推荐答案

请确保您的AppDelegate类中具有以下属性声明:

Make sure you have the following property declaration in your AppDelegate class:

var window: UIWindow?

这篇关于如果要使用主故事板文件swift,则应用程序委托必须实现window属性.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆