首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > Iphone >

ios开发 新手有关问题

2012-04-06 
ios开发 新手问题我新建了了一个UIViewController viewController在他的xib中添加了一个label然后在delega

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

热点排行