iPad window size problem - Printable Version
+- iDevGames Forums (http://www.idevgames.com/forums)
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: iPhone, iPad & iPod Game Development (/forum-11.html)
+--- Thread: iPad window size problem (/thread-7899.html)
iPad window size problem - the_wandering_monster - Jul 26, 2010 04:33 AM
Heya! I picked up an iPad over the weekend - huzzah! Now I've been trying to port one of my uni projects to it - but I've run into a problem: the project builds for and runs on the iPad okay... but only in an iPhone-sized rectangle at the top-left of the iPad's screen. I've delved into Interface Builder, but I can't edit the size of the window - the entry boxes for the window's size are greyed out Is anybody able to suggest a solution? Thanks!
RE: iPad window size problem - ThemsAllTook - Jul 26, 2010 08:27 AM
You have to make an Info.plist modification to tell iPhone OS that your app can run in iPad mode, like this:
UIDeviceFamily is an array of supported device types, where 1 means iPhone and 2 means iPad. Adding the 2 should allow your app to use the full iPad screen, though there may be other problems to resolve once that's fixed.
Small disclaimer: I develop without Xcode, so there may be a way to do this within Xcode's paradigms without modifying Info.plist directly that I don't know about.
RE: iPad window size problem - the_wandering_monster - Jul 26, 2010 08:54 AM
Heya ThemsAllTook! I've tried your suggestion but it doesn't seem to make any difference To clarify, I'm not trying to build an app which can run both on the iPhone and on the iPad - I'm trying to port a project from the iPhone to the iPad.
If I open ''MainWindow.xib/en'' in Interface Builder, the size of ''Window (UIWindow)'' is grey and uneditable, but the size of its parent ''View (EAGLView)'' is editable - but has no affect on the window (The app was based on GLSprite if that's any help.)
RE: iPad window size problem - Bachus - Jul 26, 2010 10:36 AM
(Jul 26, 2010 08:54 AM)the_wandering_monster Wrote: Heya ThemsAllTook! I've tried your suggestion but it doesn't seem to make any difference To clarify, I'm not trying to build an app which can run both on the iPhone and on the iPad - I'm trying to port a project from the iPhone to the iPad.
I forget how to fix this inside Interface Builder, but you can fix it in code.
In applicationDidFinishLaunching: in your app delegate you can add:
That'll set the size of the window to the size of your screen.
RE: iPad window size problem - the_wandering_monster - Jul 26, 2010 11:08 AM
Heya Bachus, thanks! - that's had an effect, but not the effect I was looking for Now instead of rendering into the top-left corner of the iPad with the rest of the screen black, it's rendering into the bottom-left corner of the iPad with the rest of the screen white Gah...
RE: iPad window size problem - Gillissie - Aug 24, 2010 10:53 PM
I'm having the same problem. I noticed that the frame buffer size is returning the size of an iPhone instead of iPad. I am using OpenGL ES 1 (instead of 2) and don't want to convert it to 2 if I don't need to. What is causing the frame buffers to be created at 320x480?
glGenFramebuffersOES is used to create the buffers.
glGetRenderbufferParameterivOES is used to get the width and height of the buffers.
[Edit] This appears to be related to the xib file, which seems to be stuck at 320x480. I can't figure out how to change the size of it.
[Edit 2] I figured out how to change the window size in the xib. You have to open the window before the size inspector will allow you to change the values. I changed it to 768x1024 and it seems to work now.
RE: iPad window size problem - tarapynka - Oct 4, 2010 08:23 AM
UIWindow resizing can be achieved with manual conversion of .xib files to iPad version using Interface Builder.
This is mentioned in iOS 4.0 Release Notes in Known Issues->Xcode section.
This do the trick for me.
RE: iPad window size problem - Rasterman - Oct 8, 2010 11:06 AM
Save yourself a lot of trouble, just create a new iPad OGLES app in xcode, everything will already be setup and working for you, drag your files in from your old xcode project into your new one, update the xib with the correct app delate and your done. I had to start a whole new project today and do this just to get the MF#*!!FS#$**! code signing to work.