Iphone Simulator Xcode 6 on IOS 8 visualize two black bars - ios8

I have tried new app in Xcode 6 and not use storyboard. But when I have ran the app, with Iphone 5,5s,6 and 6 plus, in Iphone Simulator visualize two black bars on the top and below. Only Iphone 4s there aren't black bars.
Do you have an idea to resolve my problem?
Thanks

You need to add a Default-568h#2x.png image file that is 640x1136 to your project. I added an all black one that was in an older project. I didn't have to set anything else, which was nice. If you are building for iOS8 and later you can just use the LaunchScreen.xib instead.

In my case I was using jpg pictures for the default. Even though I had the correct file names and resolutions, it didn't work.
Switching from jpg to png solved it.

If you designed the app so that its views had the "old" screen size, and didn't design them to be responsive to different screen sizes, then the phone will add the black bars (known as a "letterbox", I think).

Related

Xcode 10 UIBarButtonItem Images Vanish On Storyboard

I am using the latest version of Xcode 10 that's available in the app store. I keep losing UIBarButtonItem images in the designer. They are visible when the app is run. I can get the images back by switching the image to a different one and then switching it back again. This is what it looks like when the images are gone:
This is what it looks like when the images are visible:
If I change one image, all of the images on the screen come back. They will generally stay until I close down and reopen the app in Xcode.
They always display correctly when run on an actual device. I have tried it on multiple iPads, an iPhone, and every device simulator that I could find. This is only an issue with images on the designer.
This is how the images are set up in Xcode:
The 1X image is 24x24, the 2X image is 48x48, and the 3X image is 72x72. All images that I am using were created in Affinity Designer. They were all saved as PNG files. This is a file with the images that I'm using for the checkmark: Checkmark Files
All of the images have the following settings:
This is what the settings for the UIBarButtonItem looks like.
So far, this is just an annoyance that is happening in multiple apps that I'm working on. I'd just like to figure out why it is happening and if it is just an Xcode bug.

iPhone 6(s) plus not scaling new application correctly for some users

I have a brand new Swift 2.0 XCode 7 Storyboard based application.
Target is set to 9.2. I'm currently supporting any device with GPS that can run ios 9.2
I started with the Tabbed View Template and I'm working in wAny and hAny and a single Storyboard.
It works fine in the simulator on a bunch of phones, both orientations and works fine on my 6s plus, 6s, 6 plus and a 5.
But for some users the scaling is wrong and everything comes out squished.
Even in landscape mode the TabBar Icons are very close to each other.
Narrower than even on my 6s plus in portrait.
I believe this is caused by my application not having a Launch bitmap.
My understanding is there are two ways to implement this.
Launcher .XIB/.NIB with half a dozen specific sized bitmaps attached. Or a StoryBoard Launcher with ... exactly what.
The "Or StoryBoard" is a little vague. But I wanted to keep things using the modern approach since this app is new and targeted users tend to have the latest device.
So I created my Launch Image set and tried to attached it to the UIImageView in the Launcher StoryBoard. It won't list items that are tagged as "Launcher Image Set". It will show other Image Sets and Icons. But not the ones specifically for Launcher. It shows an "L" in the xcassets list next to the Launcher Image set. I believe I have the build project setting set correctly and it looks perfect on many of the same exact devices.
After some digging, I read that if you use the "StoryBoard" method you don't need the 6 or so bitmaps anymore. You can put anything in the Storyboard Launcher View and treat it just like you would treat your main storyboard.
So I did that. I just centered a small image.png file in the View of the Launchers Storyboard. Works on all simulations and my iPhone 6s plus. I did not pin it to the edges because that would mess up the aspect ratio of the image.
A very small set of users still have the issue and one of them even uninstalled and reinstalled.
I tried playing with setting phone Zoomed, Normal, Text Size, Bold etc. They all work. Users also don't have anything out of the ordinary on these system settings.
So first, do I need the 6 proper sized bitmaps or not? I read conflicting info on this.
If I want to use the 6 images on a storyboard how to I get them in the UIImageView of the Launcher StoryBoard if they won't list? Should I put them in a regular image set. Does the "Launcher Image Set" only work for the for the Launcher.XIB?
If it's not the Launcher window, what else could it be causing this?
I know I could create a XIB/NIB with the 6 bitmaps. But that seems like I'm going backwards and I don't care about old OS versions or older phones.
I think I found my answer. When using a Storyboard Launcher you cannot use a "Launch Image Set" for your Launcher Storyboard. You have to use an Image Set.
This is the best Video I found that covers it A-Z.
https://www.youtube.com/watch?v=Vz6tCgXgZFo
It also didn't fix my initial problem. Which I'll post separately. It scales correct in Portrait but not in Landscape for hand full of users. Using the same hardware as others that it works fine on.

XCode6 Autoresizing

I always tested my iOS app with (written in swift) with iPhone 6 simulator. Now I realized, that it does not automatically resize in other simulators like iPad (layout is small in the left edge) or iPhone 4s (layout is too big and cutted). I tried disabling Auto-Layout but even when I enable it again it doesn't work. What is the best way to make it resize ?
Designing for multiple screen sizes is a fundamental part of the development process and therefore you can't enable auto-layout and expect it to work the way you want.
You know that the iPhone 4S has much less screen space than the iPhone 6 Plus, so at a minimum you need to add Auto Layout constraints to your views so that they scale and position appropriately. Sometimes you might want to change or move entire UI elements for compact and regular screen sizes.
See the Apple Auto Layout guide for examples.

Xcode landscape launch image warning when not required

I am finishing up an app which only runs in portrait mode on the iPad and iPhone. As a result, I don't provide any landscape launch images - I could include them, but they would never be seen, so I'd prefer to save the space in my app.
How do I stop XCode trying to auto assign 'Default.png' and 'Default#2x.png' into the landscape images for the iPad? This causes a warning to appear, since these images are for the iPhone and so are the wrong dimensions. Alternatively, a solution to suppress the warning that appears would suffice.
Control-click on an unwanted iPad launch image in the Summary window and choose Delete. This will remove the reference to the image as a launch image for iPad. Even better, go ahead and include solid black PNG images for the unneeded launch images. They will be compressed by Xcode when it builds your app, so that they will take up virtually no space in the app bundle.
I regard the fact that Xcode automatically creates default launch images for iPhone but not iPad as a bug. I suggest you complain about this behavior at bugreporter.apple.com.
EDIT: Just to be clear, what you want is a minimal set of properly sized images with the following names:
Default.png
Default#2x.png
Default-568h#2x.png
Default-Portrait~ipad.png
Default-Landscape~ipad.png
Default-Portrait#2x~ipad.png
Default-Landscape#2x~ipad.png
This will prevent Xcode from using e.g. an iPhone launch image in an iPad slot.

iPad incorrect rendering of Objects

We just set up a whole bunch of development MacBooks in our office. We all set up the computers exactly the same as far as I can tell (just installing xcode and not changing any settings). We even distributed the exact same xcode project to everyone to test whether or not everyone was set up correctly. For some reason though, my iPad simulator incorrectly renders the positions of Objects on the UIView controller.
I can make a really basic application and slap down a UIView controller with the storyboard editor in xcode 4.3.1 (newest version ATM), and add a button to it. When I run this on the simulator, it will look fine on the iPhone one, but when I try to view it in the iPad, it seems that some elements will scale to the iPad resolution fine, but others will not. The components that do not, seem to be in the place that they would be if they had been rendered on the iPhone.
The weirdest part of this problem is that I can't find anyone online who has had this same issue. I have already tried deleting and re-installing xcode and the same thing still happens. I fear I might have to re-install the OS and start from scratch.
How it looks on the iPhone simulator:
And on the iPad simulator:
I don't think that's an SDK issue, I bet that you are writing code that fits for the iPhone screen and not for the larger iPad screen.
I think that you added just the button and is Autoresizing Mask is not set properly.
I've done some measurement an it seems that:
The distance from the top of the view is in fixed (~360px);
The width is fixed (~260px);
You need to give the button a fixed distance from the bottom (as it should stay on under the plot) and remove the left fixed margin so it can be centered.
You need to take a look at the UIViewAutoresizingMask for the UIView's autoresizingMask property.
button.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin;

Resources