Whenever I run my app through any of the Ipad simulators in xcode, the background image is stretched or zoomed in and looks really abnormal. When I run the simulator for the Iphones the background image is fine. Does anybody know what might be causing this?
edit:
Please see the following screenshots of the launchimage (how it should look) and the background once the app is done loading.
My launchimage and how the background should look:
How the background looks once the app is done loading. Notice it is zoomed in:
I've noticed your original image has resolution of 2048x1536, which is Retina display's resolution.
Solution: Rename it adding a suffix of #2x (e.g.: if your image's called background.png, rename it to background#2x.png).
Related
First, I will use static image for splash screen.
I have a quick questions about registering launch image.
I was trying to add images in launchImage file in Images.xcassets folder. However, I don't let user to rotate screen so I don't need landscape images. Do I have to add all of images in launchImage file to complete launch images?
Thanks.
Apple recommends to use a Launch Screen that let you to have the page automatically adapted to the screen sizes of different devices and environments
Apple documentation about Launch Screen
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.
I am currently working on an app in Xcode. I'm having the following problem:
I have created a 60-60 pixel image in Adobe Photoshop with a transparant background. I saved this as an .png file, and added it to the 'Supporting Files' section of Xcode. I created an image view in my Main.storyboard. However, when I run the iOS Simulator, the image doesn't appear. I have tried the same thing with a different .png file that wasn't made with Adobe Photoshop, and this image did appear in the iOS Simulator, so the problem clearly has to do with the image and not with the positioning or coding.
Thanks in advance!
So in my app I am creating, when it is run in the simulator I see the white background images, instead of my transparent background I set. This is with an XIB and not a Storyboard for what it matters.
Examples:
iOS 5.1 and below:
iOS 6 and above:
Does anyone know why this is happening and how to fix this?
I fixed this problem by instead of using a transparent background png, setting the button type to custom, not rounded-rect. This fixed the problem with white backgrounds being shown.
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.