Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to start my application in full screen on iPhone 6.0 Simulator Retina 4 Inch

I have added [email protected] to my project and set it in project settings, I have also set autoresizing options for my view and elements on that view which is initially loading on my application which is landscape-only, but after running my application in iOS 6.0 Simulator Retina 4 inch I see my application moved all the way left, leaving black pixel area on the right.

Any idea what should I do beside these things in order to see my application runs in "full screen" on iOS 6.0 Simulator Retina 4 inch?


[edit #1: AppDelegate]

I also edited my AppDelegate.m like this:

viewControllerMain = [[ViewControllerMain alloc] init];
//[window addSubview:viewControllerMain.view];
window.rootViewController = viewControllerMain;

[edit #2: Editing frame]

I managed to achieve full screen mode, but it's not working as it should. I do this in my views:

CGRect frame = CGRectMake([UIScreen mainScreen].bounds.origin.x, [UIScreen mainScreen].bounds.origin.y, [UIScreen mainScreen].bounds.size.height, [UIScreen mainScreen].bounds.size.width);
self.frame = frame;

This only brings my view to full screen, but black area on the right I mentioned on the beginning is dead and no user interaction is possible in that area (I have UIButton there which doesn't react on touch). So basically, what I did only made my view appear in full resolution, but functionality of elements on view is limited to area where my app originally showed when I first started it on Retina 4 inch simulator.


[edit #3: Changing size of UIView's in XIB files]

I even tried to change actual size of UIView's in my XIB files resizing them all to Regina 4 Full Screen, but still - same thing.


[edit #4: Changing size of window object]

I have tried to change size of window object in AppDelegate.m but again no luck. Here's how AppDelegate.m look like.

application.statusBarOrientation = UIInterfaceOrientationLandscapeRight;

mainViewController = [[MainViewController alloc] init];
window.rootViewController = mainViewController;

// Override point for customization after application launch
[window setFrame:[UIScreen mainScreen].bounds];
[window makeKeyAndVisible];

[edit #5: "Solution"]

So far I did following: In IB I made new UIViews with iPhone 5 resolution size, assigned same owner classes which are handling their equivalent UIViews made for pre iPhone 5 resolution and in code where do I need to load some of these UIViews I check [UIScreen mainScreen].borders to determine which device is currently running my application. In this way, I managed to get things work.

But still, main question remained - why didn't all my UIViews automatically stretched to new resolution after I did all those things I mentioned?

Anyhow, bounty remains active for 5 or 6 days. If someone manages to solve this issue, I'd be very grateful. If not, I'll give bounty to @onegray, since that was the thing I didn't took care of at first place, and in my current implementation it is really important.

Best regards.


[edit #6: MainWindow.xib Full Screen at Launch option]

As @user1702985 suggested, I turned this option ON as it was deselected. But no luck.

When I start my application I show one View for 2 seconds with one UIImageView on it. If I set Autosize properties right, this UIView is shown in fullscreen on iPhone 5 simulator. BUT. After that I have second UIView which contains vertical UIScrollView, UIViews as header and footer and one UIButton, and I also set all autosize options for these elements, but this UIView is shown in iPhone 4-- resolution. It really acts strange and I still don't know what can it be.


[edit #7: Auto-resizing options which are set]

This auto-resizing option is set for all my UIViews and it's elements.

enter image description here


[edit #8: Explanation of Full Screen at Launch option]

MainWindow.xib properties.

enter image description here

like image 880
uerceg Avatar asked Sep 20 '12 08:09

uerceg


People also ask

Why is my full screen not working on iPhone?

It sounds like you may have Portrait Orientation Lock enabled. You can disable this in the Control Center by swiping down from the top right corner of your screen. You'll see a lock with a circled arrow around it. Find more information here: Rotate the screen on your iPhone or iPod touch.

Why are my apps not full screen?

Enable Full screen view on selected apps.Make sure you are on the Aspect ratio tab, and then tap your desired app. Select Full screen or App default as your preferred view.

Why can't I see the full screen on my IPAD?

Whichever your video app supports, you can view it full screen by tapping the icon that looks like two arrows pointing in opposite directions. If you're viewing the video picture-in-picture, tap the right-corner icon showing two squares with one that has an arrow in it.


1 Answers

I hope this will help you but not sure that you will got touch effect in full screen, So you have to check for full touch for your application.

Step 1: Click On Project from Navigation shown in image and click on missing file

Step 2: In second image click on Add

Now run project your project will run in Full iPhone 5 screen or simulator.!

enter image description here

like image 121
Ashvin A Avatar answered Sep 20 '22 00:09

Ashvin A