Top navigation is not coming properly - iPhone Apps must also run on iPad without modification, at iPhone resolution, and at 2X iPhone 3GS resolution - ios

My App is iPhone only and it works great on iPhone device. It got rejected by Apple with below message:
iPhone Apps must also run on iPad without modification, at iPhone
resolution, and at 2X iPhone 3GS resolution
When I run my app on iPad it's cutting part of the navigator at the top. Attached is the screen print.
Anyone got any clue how to fix it?

I think you navigation bar is covered because its position is lower than the 20point reserved for the status bar. To check its position, click on the navigation item or bar, go to Size Inspector and under View, you will see the X & Y positions. Or you can set constraints for it. I hope this helps.

Actually I solved this problem long back but missed to update the solution here. I was getting this issue on iPad because it doesn't use status bar as like iPhone for iPhone app. So I did leave the status bar space at the top of the view controller. Also, this issue occurs only for standalone ViewController and if we use Navigation ViewController, issue is automatically resolved.

Related

Why does my display look different on iPhone simulator vs. iPad simulator?

I am working on a puzzle app on Xcode Version 11.0. My app displays as expected on my physical iPad mini and also on the iPhone simulators, but if I use an iPad simulator it appears to switch the orientation to Portrait mode and display my secondary screen as a popup on top of the secondary screen (see the images below).
I am using an "Action Segue" to get from my 1st screen to my 2nd screen. I have tried several different options (Show, Show Detail, Show Modally, Present As Popover). The result is slightly different, but all of them give the "Portrait popup" look. I am guessing that this is a newer feature, and I just need to set some flag to avoid it, but I don't have any guesses on what to look for. Could anyone offer some help?
iPhone 8 Simulator (this is what I want it to look like)
iPad Simulator (with undesired Portrait popup appearance)
Edit the segue to be Show Modally and also Fullscreen (instead of Automatic).

Screens of an iPhone App have a fixed aspect ratio

I am adapting an iPad app (originally built on Objective C/Swift) for the iPhone.
I have removed all things from the UI, the only things left are:
Blue fill - the navigation bar
Red fill - the toolbar
The app appears to have the screen's aspect ratio somehow hard coded for the iPad. I am unable to make the app occupy the full screen using both the interface builder and directly editing the code of the UIViewController.
Doesn't work on iPhone X 11.4 and iPhone 5 9.3, works only on the iPad family.
The issue seems to be outside of the UIViewController or even the UINavigationController.
What project setting may be causing this issue?
iPhone is allowed in Xcode, Targeted Device Family is resolved as 1, 2 for the whole project
Requires full screen is checked for iPhone
The app on various iPhones:
Interface builder - all seems fine there:
Please check for launch images. You need to provide the all sizes of the launch image which are not provided.
You can also add missing sizes from the utilities bar.

How To Fit UITableView in the screen with AutoLayout

I am trying to fill the screen with a TableView. I've tried pinning 4 edges but it broke when I view it in different devices (iPad Pro, iPhone SE, landscape and portrait orientation). The TableView is messed up for some reasons. It shouldn't be this hard to fill that in. Did I messed up some settings in my Xcode?
If you ran the application on a real device you'll find it as you expect it to be.
And if you opened another file then came back to storyboard you'll find the preview as expected too, I think it's a bug in the UI Builder.
Note: I'm using Xcode Version 8.3.2.

UITabBarController does not respond on iPhone 5 simulator: 4-inch retina display

I have a UITabBarController that displays four options. These have all worked fine until now.
My problem is that the tab bar does not respond only when testing on the 4-inch retina display device in the IOS Simulator. All other devices the tab bar responds and I am able to select other views.
I don't have an iPhone 5 to test it on so I don't know if this is a fault with the simulator or Apple have changed the workings of tab bars etc for the new hardware or made it stricter and I wrote the wrong code in the first place.
I had this issue as well and this worked for me:
Go to the MainWindow.xib, select the Window object and check the "Full Screen at Launch".
In your main window, select the "Full Screen at Launch" option. Here's an image:
Could there possibly be a transparent view over the top of it? The change in view size might be positioning something in the wrong place.

iPhone app view is cut off at the botton when run on iPad

I need your help. I have designed an app to target iPhone only and everything works fine. However, I just realised that when I run it on iPad, I get black spaces around the screen (view doesn't cover full screen of the iPad) and strangely, the bottom part of the app gets cut off when it runs on iPad. How do I get full screen iPad mode without part of the view getting cut off. Thanks
This is normal behaviour(black spaces around the screen) if the value for "Devices:" under Target/deploymentInfo is set to iPhone. In this case you can still test on iPad but with iPhone resolution. (but if it set to iPad you can not test on iPhone).
if you want to get iPad resolution you have to change "Devices:" value to universal.
for (bottom cut) check if your code uses device size for positioning buttons.
Your app must also run on iPad without modification as for
2.10 App Store Review Guidelines
At first, you have to set your the view (on Main.storyboad) to fit all size. That is `wAny hAny).
Then selected the views, add some constrains to them one by one. When you run the app, it should be right. If the position doesn't match your expectation, you can change the constrains. You should know things about AutoLayout. Find some article to read, and practise.
Thanks guys for all the comments. Using your comments and reading and testing AutoLayout features, I am able to solve the problem.

Resources