iOS8 view is fine but is smaller on iOS7 - ios

I am currently working on an iOS application with a Deployment Target of 7.1. Most of my testing has been performed in an iOS8 environment with no issues. I hooked up an iOS7 (5s) test device and found that the view is showing itself as through the phone is a 3.5 (4). I'm not sure what the difference is between iOS7 and iOS8 that would cause this but I can't seem to find a solution. I have rebooted the device, reinstalled the app, and made sure all constraints were set properly in the dev environment. Any ideas?
Thank you in advance.

Use splash screen images not splash screen xib. In my case I have the same problem iOS7 device has black stripe at top and bottom. So I change the settings for splash screen and used images as a splash screen instead of xib and it solved my problem.

Make sure your app has a launch screen for 4" devices. Otherwise it will default to 3.5" devices.

You have to create a LaunchImage in the xcassets file. That will solve your problem.

Related

Unknown padding when using tablet simulator

Why is there a black padding around when running on a tablet simulator? It works fine on iPhones, though.
I think you have made a small mistake. Your project's deployment device is set to iPhone. Just Go to your project's General tab and in Deployment info change device to Universal. Thats it.
It works in iPhone-Mode. You can use iPhone apps on iPad. It just scales to fill screen. If you want your app universal. You should make sure that your layouts work in Any,Any size class. And as #Bhavin Ramani answered, you should set it universal.

iOS 9 xCode 7 built app displays black rectangle instead of splash screen

I know this question may seem like a duplicate of a few existing ones but its not.
I am struggling with this issue where universal (iPad/iPhone) application does not display the splash screen anymore.
Before upgrading to iOS 9 and Xcode 7, no such issues were present. After upgrading no changes were made to the splash screen in any way.
Tech data relevant to the question:
Supported devices are iPad (landscape only) and iPhone
(portrait/landscape)
I use "Launch Screen.xib" that has an UIImageView with size classes and
constraints set up so that it's always full screen.
I have added all splash screen images in image assets (except iPad
Portrait ones)
I use Xcode Version 7.0.1 (7A1001) and iOS 9.0.2
This issue does not happen on an iPad
The wrong splash screen looks like this on iPhone 5s:
This is made in portrait mode, so there are white squares on top and on bottom of this "black square".
I was struggling with this issue yesterday but I managed to fix it by renaming my launch screen to "LaunchScreen.xib" (without the space). But this morning the issue re-appeared.
Things I've tried:
Removing and creating LaunchScreen.xib again with and without space
Creating LaunchScreen.storyboard file instead of xib
Adding #2x and #3x versions of image used in LaunchScreen.xib
Removing/adding/replacing images in image assets
Cleaning, build cleaning and even deleted derived data
Restarting device, reinstalling app, relaunching without building and many other solutions that I could think of.
Nothing helped, so maybe someone fixed a similar issue already and can lead me to the right direction.
EDIT 1
So I renamed my LaunchScreen.xib image used from "Default.png" to "DefaultSplash.png". This instantly fixed all issues on iPhone. But now I have a new problem - iPad splashscreen is now black. If I set the LaunchScreen image to some other image used in project, the Ipad displays it as splashscreen without any problems, but neither Default.png nor DefaultSplash.png can be used on ipad now. This is really weird issue.
In my case the images in the "Launch Screen.xib" weren't displaying. I had to rename them and reset the new names in the nib file to make it work.
So I fixed the issue like this:
Since I renamed the file LaunchScreen.xib, it fixed an issue on iPhone but caused a similar problem on iPad. Since then, I cannot use the same image file name for the same xib (i.e. if image "Default.png" failed, it cannot be used anyomre... Bug?). So I created two files, LaunchScreen.xib and LaunchScreen~iphone.xib with separate image files for each. Now it works okay.
Seems ugly and buggy but it works.
There is a change in Xcode7 iOS 9 onwards. They have modified Launchscreen(Black screen we will get).If you change deployment target means you can see the previous launch screen. Only empty view controller is present so we have make changes on it.
As per requirement in assets add images in imagecassets.
It may sound stupid but something related to this scenario may happen:
If you hook any outlet and then break it by changing the custom class you will get this black screen behavior without any warning, instead of the typical crash from any non launch storyboard/scenes this will lead to a black screen before the app start.

How to fit the screen to the window in IOS Simulator

I would like to make screenshots of my app in IOS-Simulator. This works fine with CMD-S, but I have always black parts in my screen, because the windows is not autosized to the simulated devices screensize.
Is there a way to autosize the window to fit with the screensize of the simulator ?
Screenshot:
The white part is the content of the device. The black is obsolete and is a window from the MAC. When taking the screenshot from this, I still have to cut out the content to have a good screenshot.
This used to happen in earlier to iOS SDKS when you don't set a launch images for all devices.
In your case, I think you don't have the launch screen file set. this can be solved by setting that file at general section in the target's settings.
Alternatively, set launch screen images for all devices.
Check my answer here.
One more thing to try: At the top bar in simulator. choose the
Window menu then Scale and play with those values.
I solved it the following way, but I don't know what was the reason.
I removed the launchscreen as hasan83 suggested. This did not the trick yet.
I restarted the MAC
I started XCode ("Xcode"->"Open Developer Tools"->"IOS Simulator")
I started the ios simulator without starting my app. -> MAC-Windows fit with the simulated device screen
I started my app and now it looks as intended.
Thanks for helping to all involved people !

Black Frame Around iPad Build

I made an iPhone app under universal applications. Deleted the iPad storyboard at the start and added it back in using this answer: Converting Storyboard from iPhone to iPad at a later stage.
Now when I run my iPad build, there seems to be a black border around it.
I've made sure my .plist is using Main_iPad for Main storyboard file base name (iPad).
Found my bug: this is because under Deployment Info in the General tab, I selected only iPhone as my Devices. Changing it to Universal fixed it.
Frankly speaking, this looks like just a scaled-up version of iPhone app. Anyways, to make it work in a better shape you may have to tweak here :
Make sure you have added constraints that actually meeting the iPad size requirements as well. The width & the Heights.
Please provide a launchImage for iPad size. That should solve your problem.
Hope that helps.

ios app not fitting iphone 5 screen

My ios app does not fit on iphone 5 screen. When I run the app, I can see blank space at the top and bottom of the screen. I have made the app compatible for both iphone sizes. But Since I have updated to the latest xcode, I am facing this issue. See screen shot. Can any one please help?
You probably may not have set your Default-568h image.
On the simulator make sure you have set to iPhone (Retina 4-inch).
You can do this by going simulator menu at the top go to Hardware->Device->iPhone (Retina 4-inch) that will change the phone simulator to the iPhone 5 version.
click here for more get information for naming convention of images [here]Naming convention for iPhone 5 images? [here]
Try setting AutoresizingMask to your container views instead of assigning appFrame.
I have faced the same problem while moving to iOS 7.
Solution comes with AutoresizingMask. iOS 7 has full Screen layout for ViewControllers.

Resources