开发者

Proper setup for universal OpenGL ES iPhone/iPad app in XCode 4

开发者 https://www.devze.com 2023-03-01 00:47 出处:网络
I\'ve been trying all morning to setup a univeral OpenGL-ES app with limited success. I can easily get the default OpenGL template app to compile for both devices and run just fine by adding a new XIB

I've been trying all morning to setup a univeral OpenGL-ES app with limited success. I can easily get the default OpenGL template app to compile for both devices and run just fine by adding a new XIB file and setting the proper values in it. Where I'm having trouble is figuring out how to give each device it's own unique GUI. Currently both devices use the same ViewController.xib file that is created with the project. How can I create a separate XIB file that uses the same ViewController .h and .m files? Do I need to create a separate AppDelegate class for each devi开发者_JAVA技巧ce type, or can they be shared?


The standard approach is to have a base AppDelegate class, and then subclass this for each device. Each delegate would then load its own XIB file with the correctly sized UIWindow and add the views.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号