错误:请求成员“根视图控制器”在不是结构或联合的东西中?
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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您在标签中明确提到了 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?
它尝试在对象
self.window
上设置属性rootViewController
,但不能。 self.window 存在吗?它是什么类型?我的猜测是,您已经复制并粘贴了本应放入应用程序委托中的代码到其他地方。It's trying to set the property
rootViewController
on the objectself.window
, but it can't. Doesself.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.