iPad window size problem
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!
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!
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.
Code:
<key>UIDeviceFamily</key>
<array>
<integer>1</integer>
<integer>2</integer>
</array>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.
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.)
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.)
(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 differenceTo 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.)
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:
Code:
CGRect rect = [[UIScreen mainScreen] bounds];
[window setFrame:rect];That'll set the size of the window to the size of your screen.
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...
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...
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.
Thanks!
[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.
glGenFramebuffersOES is used to create the buffers.
glGetRenderbufferParameterivOES is used to get the width and height of the buffers.
Thanks!
[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.
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.
This is mentioned in iOS 4.0 Release Notes in Known Issues->Xcode section.
This do the trick for me.
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.
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| Small size texture problem | kendric | 3 | 2,532 |
Mar 25, 2009 06:40 PM Last Post: kendric |
|

