错误:请求成员“根视图控制器”在不是结构或联合的东西中?

发布于 2024-12-21 19:56:49 字数 137 浏览 4 评论 0原文

self.window.rootViewController = self.tabBarController;

在非结构或联合中请求成员“rootview 控制器”,

此错误意味着什么????

self.window.rootViewController = self.tabBarController;

Request for member 'rootview controller' in something not a structure or union

what does this error mean?????

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

梦回梦里 2024-12-28 19:56:49

您在标签中明确提到了 iOS SDK 3.0。我不确定这是否是一个错误,因为当前的 SDK 是 5.0,没有人应该再使用 iOS SDK 3 进行开发,但假设这不是一个错误,window 的 rootViewController 属性直到 iOS SDK 4 才添加,所以也许这就是为什么它不起作用?

You explicitly mention iOS SDK 3.0 in your tags. I'm not sure if that's a mistake since the current SDK is 5.0 and nobody should be developing using iOS SDK 3 any more, but assuming it's not a mistake, the rootViewController property of window wasn't added until iOS SDK 4, so maybe that's why it doesn't work?

未蓝澄海的烟 2024-12-28 19:56:49

它尝试在对象 self.window 上设置属性 rootViewController,但不能。 self.window 存在吗?它是什么类型?我的猜测是,您已经复制并粘贴了本应放入应用程序委托中的代码到其他地方。

It's trying to set the property rootViewController on the object self.window, but it can't. Does self.window exist? What type is it? My guess is that you've copied and pasted code that's meant to go in the application delegate somewhere else.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文