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.
精彩评论