Abandon image cassetts for LaunchScreen.storyboard - ios

So I have a fairly old app, last time worked on before iPhone X(s) was released. Always used Launch Images Source instead of Launch Screen File as seen below.
I am now having issues launching on iPhone X, as the screen size is assumed from the LaunchImage and there is NO launch image currently provided for iPhone X(s) in the "LaunchImage" file of .xcassets folder.
What is the most straightforward way to abandon using cassets in use of the new "Launch Screen File"? I have already tried creating this and using it, but had no luck getting an UIImageView to resize an image with said screen sizes on devices.
Im really looking for a straightforward guide for creating a LaunchImage.storyboard file that can adapt a launch screen image(full-sized image) to any device size.

What is the most straightforward way to abandon using cassets in use of the new "Launch Screen File"?
Change the Launch Images Source pop-up menu to "Don't use asset catalogs".
Make a LaunchScreen.storyboard if there isn't one, and point Launch Screen File at it. Make sure your launch image storyboard uses autolayout and is designated as a launch screen.
Now configure your storyboard's view controller using autolayout so that it lays out correctly on all devices.

Related

iOS 13 Project without Storyboard displays funny

I have this project that is not using storyboards when I run it on my iPhone simulator it is not coming up full screen ?
From the viewcontroller property inspector select the presentation and set it to full screen it will work check the below image
check the content mode it should be scale to fill and size as freeform
Add below image to your project. Using the name Default-568h#2x.png
Because Xcode doesn't know your app size so this will pickup smallest size 320x480. With this image and name I suggest above, Xcode will recognize your app support bigger size.
Don't worry when running your app in smaller device, it's still OK.
Image HERE
This might be related to issue in launch screen. I also setup the project without storyboard but deleted the LaunchScreen.Storyboard as well and ended up getting the same screen as yours. After I recreated the project but leave the launchScreen file i was able to get the full screen display for my viewcontroller

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

How to display launch image

I'm a very new to iOS.
My Xcode version is 7.2.1 and I'm trying to run on iOS9 using Swift.
My problem is that I'm very confused with how I should be creating the Launch Screen Image.
I found that there are many ways of creating the launch screen images for different version of iOS.
Can someone please explain to me how to setup my launch images?
The process I've followed is:
I create Launch Screen.storyboard I create different sizes of
launch screen images in Photoshop.
In General tab, Choose Main Interface "Main".
In App icons and launch images> Launch images source "Brand Assets".
I click on the arrow beside of Brand Assets, and then I put different sizes of images. (iPhone- iOS 8,9 , iPad- iOs 7-9 (Portrait and landscape), iPhone portrait).
Launch Screen File is "empty". I didn't choose anything.
After all I run on iPhone 5 simulator. It did not show anything and just black screen appear.
One thing I want to know is that do I need to put a UIImageView in my Launchscreen.storyboard?
Isn't it automatically retrieved from the Images.xcassets folder?
you can set Launch Screen like this
step 1: Go to Target -> App icon and luanch images
step 2:
step 3: LaunchScreen.storyboard
When you start a new project, you get LaunchScreen.storyboard below are the steps you should follow:
Put Image View in the viewcontroller present in the LaunchScreen.storyboard
Use autolayout to adjust the image view as per your need.
Select the imageview, go to attribute inspector and change the image.
Hit run

Change default app icon and loading screen in SpriteBuilder

I'm making a game with SpriteBuilder and cocos2d in Objective-C and don't know how to change the default loading image an app icons in SpriteBuilder.
Does anyone know how to do that
This isn't something you can change from within the Spritebuilder app. You simply do it by replacing the images that you'll find in the Source->Resourcessubfolder in your project folder. There you'll find all the different default.png images (for the different resolutions), and the icons (in the iconsfolder). All you have to do, really, is to replace them with your own designs.
my solution was to create a Launch Screen.xib file (File, New, File, iOS, User Interface, LaunchScreen). Then in the general settings for the project, where it says Launch Image Source, click "Don't use assets catalog." The last step is to set the launch screen file to your new .xib file, if you didn't change the name like I didn't, just type in Launch Screen.xib
Now if you launch your app, you should see that the loading screen is the same as the screen made in the launch screen.xib file.
The downside to this is that (I think) you can't use your own image. However most launch images tend to be a simple background color and some text, which is easily editable in Xcode.
The upside to this is that Xcode handles all scaling and aspect ratios, so you only need to set everything to percents and make one image, as appose to creating many different sized images.
Hope this helps.

how to setup ios launchscreen.xib with LaunchImage in image.xcassets

I am using Xcode 6.2 . It now comes with a LaunchScreen.xib . I also have a splash screen image in my image.xcassets.
Should I integrate the splash screen image into a imageview in the xib file? I tried this, and it does not let me put that image file in the interface builder.
How do I accomplish this?
I'm not sure if this was the best way, but I actually removed the LaunchScreen.xib file from my project and indicated the Launch Images Source to be the LaunchImage within the images.xcassets folder. I even removed the LaunchScreen from the Launch Screen File and it works how I want it to now.
Image below is from my project's target General tab.
Launch image is basically needed for devices before iOS 7.1 and launch nib is new feature in devices after that.So I put launch images and launch nib both in my project
Xcode 6 allows use a LaunchScreen.xib for iOS8+. It the best way to create a launch screen if your app:
Support only iOS8+, previous version need a launch image source.
If your launch screen is simple and you can get it using UILabel or other UI objects supported in launch screen xib.
Why use LaunchScreen.xib? Because you can support all the screen devices with one file if you setup the auto layout properly. And believe me, it's great if you're coding a universal app.
If your launch screen has a more complex design (logos, custom typography...) you'll have to use launch images sources and you'll have to create one image for every screen sizes.

Resources