当前位置: 代码迷 >> Iphone >> ios开发 新手有关问题
  详细解决方案

ios开发 新手有关问题

热度:122   发布时间:2016-04-25 06:44:34.0
ios开发 新手问题
我新建了了一个UIViewController viewController
在他的xib中添加了一个label

然后在delegate中的方法中使用
[self.window addSubView: viewController.view];为什么说找不到view
view不是已经继承过来了吗?

------解决方案--------------------
C/C++ code
         // Set the view controller as the window's root view controller and display.    self.window.rootViewController = self.viewController;    [self.window makeKeyAndVisible];
------解决方案--------------------
[self.window.viewController addSubView: view];
[self.window makeKeyAndVisible];
  相关解决方案