Unity3d 添加IOS View(2)
int OpenEAGL_UnityCallback(UIWindow** window, int* screenWidth, int* screenHeight, int* openglesVersion)
{
...
[_window makeKeyAndVisible];
[view release];
IOSRootViewController * _IOSview=[[IOSRootViewController alloc]init];
[_window addSubview:_IOSview.view];
[_IOSview release];
...
}
在这个函数添加的view可以在其他视图中查找引用到
for (UIView *v in [UIApplication sharedApplication].keyWindow.subviews) {
NSLog([v class]);
}