读书人

ios开发 新手有关问题

发布时间: 2012-04-06 12:22:24 作者: rapoo

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

读书人网 >Iphone

热点推荐