Use static launch Images instead of launch file - ios

I want to use static launch Images instead of launch file, so I have created a LaunchImage folder in Images.xcassets. I have also deleted LaunchScreen.xib and made some settings.
But on iOS Simulator, the launch image is still the same as before without the images I have added. How can I deal with this?

You just have to let the field Launch Screen File empty. If you let this field fill, it will be used by your project.
Also, if you don't have any launch image sources in your cassettes, you will just have a black screen until you fill them.

It is necessary to add images of the correct sizes (for all device sizes that your app supports).

Related

Xamarin LaunchImage not listed as a source in ImageView properties

I'm working on a mobile app for iOS/Android. I'm using Visual Studio Community for Mac version 8.1.5, and the project was initially created as a new Tabbed Forms Xamarin App.
When the new project was created, the Assets.xcassets "folder" already contained two items - AppIcon and LaunchImage, with the LaunchImage screen looking like this:
I didn't create this, it already existed. There was also a LaunchScreen.storyboard file, and in the info.plist file, the iPhone Launch Images setting was already set to LaunchImage (the name of the image set in xcassets that already existed and which is shown in the screenshot above), and the Launch Screen setting was set to LaunchScreen:
I then added a bunch of images to a subfolder in the Resources folder, added each image to the correct box in the xcassets screen, saved everything and then tried to add an image to the LaunchScreen.storyboard file.
Unfortunately, when I add an Image View control to the Launch Screen, the Image dropdown in the widget properties does not list the LaunchScreen as an asset I can use!
If I create a new Image Set in the xcassets folder, it creates a screen like this:
This has nowhere near the number of different images sizes (I guess because it's a general image, not an image specifically for the launch screen), but, I can set the Image View on the launch screen to use this set.
So my question is: how can I use the LaunchImage screen (with its many different sizes for different devices) as the source of an Image View widget on the LaunchScreen story-board? What am I missing?
Here is the guide for Launch Screens for Xamarin.iOS Apps .
You can pay attention to the third section of this chapter (Managing Launch Screens with Storyboards) ,
Add an image to the Assets.xcassets Asset Catalog so that it is available for use on the Launch Screen. For more information, see the Adding Images to an Asset Catalog Image Set section of the Displaying an Image guide.
Explain:
If clicking Launch Image selection. ImageView's droplist can not see it.Because this is used as System image, and if want to show in LauchScreen. You should set in info.plist as follow: (Only set Source , not set LaunchScreen)
If clicking Image Set In Asset Cattalogs , then ImageView's droplist can see added ImageSet Name there.But first need to set info.plist as follow:

Add Launch Screen Image instead of using LaunchScreens.storyboard for iOS

I'm doing my UI for my iOS apps programmatically. The only things that is left is the LaunchScreen.storyboard where I didn't find a way around using it, yet.
Strangely I can't find much about that in the internet.
Is there a way to get rid of it and use an AssetSet instead?
That's (the highlighted file) what I want to get rid of
Since the question included "use a View or and UIImage instead?"
From Apple's docs...
Static Launch Screen Images
It’s best to use an Xcode storyboard for your launch screen, but you can provide a set of static images if necessary.
Reference page, including a list of required image sizes: https://developer.apple.com/design/human-interface-guidelines/ios/icons-and-images/launch-screen/
Note: To use images instead of a storyboard...
In Xcode open your Assets catalog (or create a new one), right-click in the assets section and select App Icons & Launch Images -> New iOS Launch Image and it will create the proper template. Also go to project General settings and select Launch Images Source - Use Asset Catalog...
There is noway to accomplish what you want , you have to supply a storyboard file for the launch screen in plist , if you want to customize go to the layout and add image or anything you want , there is no place to configure a programmatically UIView for that
Here a short description of the steps based on the answer from https://stackoverflow.com/users/6257435/donmag:
create a new AssetSet: + -> AppIcons & Launch Images -> New iOS Launch Image
Go to your Target Settings to General
Under App Icons and Launch Images clear the field Launch Screen File and select your LaunchScreen Asset set that you just created at Launch Images Source
You might have to delete the App from the device/simulator that you test it on and the new Launch Image should show up on start

iOS Launchscreen is not being displayed in Xamarin.Forms

I don't know what happened but since some days ago the LaunchScreen is not being displayed. Check the following:
Any ideas?
Seems that you want to use LaunchImage Assets for your LaunchScreen. You are setting Source & LaunchScreen, both, at the same time.
If you want to use LaunchImage Assets, Delete the content inside the Launch Screen in info.plist as below:
Launch Screen uses the LaunchScreen.storyboard single file to use across the devices (iPhone/iPads).
While Assets Source uses the Image catalogs, to set specific Launch Image for some specific device of resolution.
You have to use both of this options as an alternatives.

Use static image for launch image iOS 9 from Asset Catalog

I'm trying to use a static image on my LaunchScreen.storyboard, so we need unique sizes for each device.
In my assets folder I can great a launch image Image Set that allows me to add images for each device, however I just get a blank launch image when I use these in an Image View. A regular image doesn't give enough options (only 1x, 2x, 3x for iPhone/iPad). What's the best way to do this?
To clarify: how can I use a full screen static image that fits on say both a 4S and iPhone 5 when both those images are technically 2x? Creating a new launch images asset gives all these options for different screen sizes, however it can't be used in storyboard as an image like a regular asset.
Instead of using the LaunchImage set, add a normal image set of the image that you want to be on the launch screen to your .xcassets file. Next, add a UIImageView to the UIViewController in your LaunchScreen.storyboard and set the image using the Attribute Inspector.
Step 1: Add your image assets to the .xcassets file
Step 2: Add a UIImageView to the LaunchScreen.storyboard file
Step 3: Add constraints to the UIImageView and set the image in the Attribute Inspector
BTW, don't forget to make sure that the Launch Screen File in your .xcodeproj is set to your LaunchScreen starboard file!
You should now be good to go!
UPDATE: Static Launch Image using only the .xcassets file
If you want to use a full screen static image on launch, you can use just a LaunchImage set in your .xcassets file.
If you don't already have a .xcassets file in your project, add a new file like so: File > New > File > iOS Resource > Asset Catalog.
Next, open your .xcassets file and right click > App Icons & Launch Images > New iOS Launch Image
Now you can add specific launch images for iPhone 4(S), 5(S/C), 6(S) and 6(S) Plus. (BTW, I've selected only the portrait orientation for this image set).
The last, and very important step, is to leave the Launch Screen File field in blank in your target settings!

Xcode 7 Launch Screen images dont load properly

I am trying to make some different launch screens with Xcode 7 ios9.1
for different iOS devices (iPhone iPad)
If you take a look at the following images this is what I've done
Here I have made exactly all the images dimensions that it needs and I have filled out all the table with the images. I have made this by right clicking and selecting New iOS Launch Image.
Here I have set the launch images from LaunchImage.
And here is the launch screen storyboard which I have left it empty.
Now, when I run the app, it doesn't load the loading screen.
You need to Remove one String from your project info.Plist File for Launch splash screen.
It's Launch screen interface file base name.
I attach Screenshot for remove String in .plist file
Here you saw second line just remove from Your file
In addition to Maulik Patel`s answer, I found that if you set launch images improperly, maybe you need to delete the app on your iPhone or simulator, set launch images right and rebuild it again. It works for me. Maybe there is still some cache of settings in the app.

Resources