xcode only running 3.5 inch screen [duplicate] - ios

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

Related

App does not fit on anything but an iPhone (Plus Models) [duplicate]

Running my App in the iPhone X Simulator (GM Seed) I am noticing two strange effects:
the App does not use the full screen space (top and bottom area is black)
a strange white bar beneath the title bar
Does anybody know what is happening here and how to resolve this? I can't find any new settings in Interface Builder.
When using launch images (instead of the much easier Launch screen file), you need to provide the properly sized launch image for each device size you wish to support. Once you add the additional launch image, your app should take advantage of the new screen size.
The new iPhone X requires a launch image sized at 1125px × 2436px which is a 3x image for 375pt × 812pt.
Of course if you switch over to using a Launch screen file instead of individual launch images, your app will automatically adapt to all device sizes without any additional work.
I have figured out this issues in iPhone X. Launch image size (1125*2436px)
Please flow this below steps.
1.i)Choose your project name in Xcode.
ii)Select your project target
iii)Then select Launch images source
You can get Migrate popup
i) Choose Assets
ii)Select Migrate
After that select your Assets.xcassets in your project
Then select Launch image in assets
i)Then select attribute inspector
finally check your Launch image source. you can see set Launch image.
iPhone X needs different launch image sized 1125px x 2436px (375pt x 812pt #3x).
Check human interface guidelines for more details.
I have figured out how to fix (though I still don't understand why this happened only on iPhone X) LaunchScreen storyboard on iPhone X with seeing black top&bottom bars.
I have LaunchScreen storyboard with one UIImageView.
UIImageView's top&bottom has to be pinned to SuperView's top&bottom. NOT to SafeArea.
I fixed it by simply inserting some random text in the Lanch Screen File textfield. I dont even have a Launch Screen File... XCode is so buggy.
update
Although this fixes it in simulator (still very weird and unexpected) when uploading a binary to iTunes Connect it will fail due to not finding a LanchScreen file of name "random-name"
Just ran into this while trying to update an app I hadn't worked on in a while.
On Xcode 9.4, I was able to fix this by doing the following:
Add a launch screen by going to File -> New -> File... -> Launch Screen
Make sure the newly added launch screen storyboard is selected as the launch screen file under project settings.
If you already have a 1125px × 2436px launch image but the app is still not using the full screen check to make sure that your image is PNG.
if you removed LaunchScreen.storyboard; Choose your project, select your project target, General -> App Icons and Launch Images -> Launch Screen File: Select here Main.storyboard instead of LaunchScreen.storyboard
Just had this problem... When I selected the project & the correct target I had a blank for the 'launch screen file' under the app icons and launch screen images tab. I set it to the default LaunchScreen and the resizing issue I faced was taken care of.
You may check in project target launch screen file is not set to empty if it is empty it may cause problem.
Yes me too face that top spacing issue in iOS 15,
iOS 15 needs some new size of the Launch images
So you please check your all the launch screen images
Check your Attribute inspector is portrait for Launchscreen

The app is not showing on full screen on iPhone but is running fine on the simulator

The app is completely visible on the full screen in the simulator but does not show up completely when I run it on the device. Here with attaching the screen shots for consideration.
Add a splash screen. It will solve your issue. The top & bottom black color is because you didn't added a splash screen. Add it & it will return to a full screen view. This happened because you have migrated the project which developed in an older version of xcode
A solution for your case
You need to add splash screen #1x (Image for non retina display, don't put #1x), #2x, #3x of all devices, and check this 100% your issue will be fixed.
i.e
splashscreen.jpg (#1x, Don't need #1x for non retina display)
splashscreen#2x.jpg
splashscreen#3x.jpg
Please check splash screen size in this link
https://developer.apple.com/ios/human-interface-guidelines/graphics/launch-screen/
If still your issue not fixed please let me know or check above link.
Update :
Please check Launch screen interface file base name in info.plist
Please check In General Tab and check
What have you done to make the app FullScreen?
Maybe this will help:
Add the UIRequiresFullScreen key to your Xcode project’s Info.plist file and apply the Boolean value YES
Info.plist is one of the file below the Main.storyboard or viewController.swift
Reference
You need try following solutions.
-> Add Launch Images and select in setting.
-> Add Launch screen storyboard and select it as Launch screen file in Setting.
This happened only because of the splash screen for (Size 640 x 1136 ).
When you will add this size of splash screen this issue will solve.
If you already added then, i would suggest you to recheck the Size of your splash screen.
You have to check your image size only no need to do something else.
Please do one thing uncheck your iOS 6 or Prior from Assets.xcassets.
You can check it in this image.

While running on device Screens doesn't comes Fill screen

I have run an application in iPhone 5 device it doesn't comes in full screen. remaining top and bottom comes in black color.
In simulator it is working fine.
Edit :
I he used this side menu, RESidemenu
While using this having the problem with the window. The window is resizing.
I am using Xcode 6.1
I think that you must have your LaunchScreen.xib missing or deleted. Add your LaunchScreen.xib or Default-568h#2x.png to your project and set it to the Asset Catlog.

iOS 8 UITableViewController separator scrolling render

I've come accros a problem with iOS 8 on the iPhone6 and simulator, when you have a UITableViewController with visible separators there seems to be some render problem. Now I could post some code but really if you make just a simple UITableViewController you would have the same problem, just look at eBay and Kijiji they all have this issue.
Normally you wouldn't see this small difference if it only happened once in a blue moon but if you scroll none stop you will see it flash. (less on Ebay since their separators are too close to white but Kijiji is pretty apparent)
Sorry I wanted to post a screenshot but sadly I don't yet have the reputation to do so therefore you will have to try it out yourself's.
Any help would be appreciated
Thanks
The reason why the separators flash is because the app is not designed for the larger displays, and the phone is upscaling the app to fill the larger screen. Since the separator height becomes fractional, the separator line crosses pixel boundaries and becomes antialiased, making it appear wider, lighter, and/or darker than normal.
The answer is to (wait for the developer to) update the app to support the native resolutions of the iPhone 6 and 6 Plus.
You can enable native resolution in your own app by adding launch images or a launch screen file.
Launch images
iPhone 6 requires a portrait launch image of 750x1334.
iPhone 6 Plus requires both portrait (1242 x 2208) and landscape (2208 x 1242) launch images, since it can launch apps in landscape as well as portrait.
Launch screen file (iOS 8)
You can add a launch screen storyboard or nib through Xcode.
In Xcode 6, open the File menu and choose New > File... > iOS > User Interface > Launch Screen.
In the General tab for your project's settings, look for the App Icons and Launch Images section. Set the Launch Screen File to the name of the file you created. This will set the UILaunchStoryboardName key in your Info plist.
Add Renders with edge antialiasing in your plist file, fixed the problem for me.
Remove the Clips Subviews on my custom cell did fix the issue for me.

iPhone 6 - app does not fill screen

Most of my apps scale up when run on an iPhone 6, but for some reason one of my apps looks like this:
What would cause it to not just scale up and fill the screen?
EDIT: Here are some repro steps:
Create a new project (Single View). Turn off size classes and just use iPhone.
Make the background orange.
Add a yellow UIView subview at (20,20,280,200).
In Xcode you get this:
Now simulate on iPhone 6. You get this:
Why doesn't it just scale up and look normal?
Not sure why this is getting downvoted. It's a legitimate question. And here's the legitimate answer:
Remove the "Launch Screen File" in Projects > General. Xcode 5 did not have this so older apps scale up automatically. Apps created with Xcode 6 get a default Launch Screen file created.
Removing it will make your app scale up on iPhone 6.
I have got the same problem and I managed to solve it by adding constraints to my ViewController in the storyboard.
Make sure that you clicked the ViewController of your scene. They yellow button in the this screenshot.
Click Editor-> Resolve Auto Layout issues -> Add Missing Constraints
Now you will find that the background image is scaled up to fill iPhone 6 or iPhone 6 plus.
Note that this solution works for me even if I did not provide any launch screen file.
I had the same issue. Searching for an answer, most of them mention the launch image. To me, what did the trick, was that I first enabled launch image for iOS8.0 and later in Xcode, which requires the native resolution sizes for 4.7" and 5.5". Adding these sizes didn't help, but when I re-disabled them, it started working!
If you do have any launch image, you will need launch images for all appropriate sizes. I was doing a minor update to an app, and it was not showing correctly on the iPhone 6 simulator. I created four launch images (.png files). Since the app should still run on iOS 7, I apparently could not use an asset catalog. I gave the images the correct names, and all is good.
Image sizes and names may be found here:
Sizes and Naming of Launch Image for iPhone app in iOS8

Resources