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

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.

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).

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

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.

xcode only running 3.5 inch screen [duplicate]

We have an iPod app built with base SDK as 5.1.
App has a tabBarController with three tabs and each tab has a UIViewController to load a different view.
The app works fine for iOS 6.1 and iOS 7 (3.5 inch display) simulator and device but when we run the app on
iOS 7 (4 inch display simulator) or device we are getting black bars at the top and bottom of the view screen in all three tabs.
If anyone can suggest reason for this or some feasible solution to this problem, it would be really helpful for us.
Thanks
First thing is that you must add the required default image for 4 inch screen display. Check Properly in you project have image with name Default-568h#2x.png (640 × 1136 pixels)
This Default-568h#2x.png is Necessary for Support app in 4 inch Screen display
Ones you add this image in to you working Project, Remove old Build from device or Simulatore, clear Project and re build and check Hope you issue will solve.
Edit:-
After fix the black Bar issue you can check the device like my answer Give here check this:-
Detect device type
you have two choice if you can't use AutoLayout
First
Create two xib with same class one for 3.5 inch screen and one for 4 inch screen set using macro with checking which screen appear.
Second
Set Self.view frame using macro with checking which screen appear.
There are also other methods you can use for set self.view frame as using window frame or UIScreen
My problem was I accidentally deleted the value found here:
I added back LaunchScreen, and made sure there was a LaunchScreen.xib. Maybe it will help some others.
Ive had the same problem - black bars at the top and bottom. It was simply solved by setting the drop down in "App Icons and Launch Images" to Main_iPhone:
App Icons and Launch Images Screen Shot
I was facing same problem . I just added launch image and it worked for me.
XCode->Click on Project File -> Select Target-> App Icons and Launch Images -> Add launch image source
This worked!
Pay attention to Step#5 and Step#6 below:
1.In xcode, Click on the Project file in Project Navigator
2.Click General tab
3.Type "Main_iPhone" in the Launch Screen File field
4.Save
5.Remove the app from device or simulator
6.Then in Xcode go to Product Menu and then select Clean
7.Build again

iPhone app's storyboard does not display correctly on iPad

I've spent a lot of time attempt to research this issue and haven't gotten any results unfortunately.
[edit: being more explicit with my question]
My question is: why are the objects on my view controller not appearing when I run the iPad simulator? The background color of the view controller is displayed. The navigation tab bar appears as well. But neither of the two objects on my view controller appear (which have constraints on them).
[/edit]
If I look at the info.plist I see that I have "Main Storyboard file base name" with a value of Main (which makes sense, as my one and only storyboard is main.storyboard).
When I run the app within the iPhone simulator, all is well. When I changed the simulator to iPad, this is what happens:
Launch Screen appears
View Controller appears with the background color I have chosen in my storyboard scene.
When in debug, I see that it's going through the code to load up my views as it does when running in the iPhone simulator.
The Tab Bar controller's tab bar appears at the bottom of the view controller as expected.
Is this somehow related to the width and height I have selected? I have it set to: wCompact hAny. When I change it to wAny hRegular, the items I had placed in the scene (a UIView and a UITextField) "disappear."
Some background:
I originally created the app as Universal. But what I want, at least for now because I'm still learning, is just an iPhone app that will also run on an iPad (with that 2x option). I changed the Targeted Device Family to iPhone under both the Target and then later under Project.
I know one option is to just make an iPad layout, but I'd really like to know what I'm doing wrong here.
[edit: one solution]
The resolution I took, although I feel it's not the one I wanted, was to change the size to one that iPad supports and then paste the two objects (UIView & UITextView) into the scene that was defined as wAny hRegular. Then I hooked up those 2 objects to their outlets in the View Controller and I now have my app appearing in the iPad simulator.

Tabbar cannot clickable after iPhone 5 optimize

I am optimizing my screen from iphone 4 to iphone 5. However, Once I have optimized, my tabbar stopped working. As it can be seen in the first image, once I clicked on world average, it took me, tabbarcontroller and now user cannot able to click on tabbar segments.
I had this issue and this worked for me:
Go to the MainWindow.xib, select the Window object and check the "Full Screen at Launch".

Resources