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];