Change launchScreen color - ios

My application supported multi-theme. I need to change the launch screen color after user changing the theme.
Is this possible? I tried to set the color in app delegate in application.didFinishLaunchingWithOptions but nothing changed.

No, a launch screen is static and can't be changed in any way at runtime.
Keep in mind that the launch screen is shown before your app is actually running.

Related

iOS 11+ launch screen - custom named colors in dark mode

Is it possible to use user defined named colors in the launch screen storyboard?
I tried creating test color in xcassets, with appearances {dark, any} and setting it as Launch screen main view background.
I noticed significant differences:
- in RELEASE my custom colors never work
- in DEBUG some colors work, some are ignored, some are changing values (e.x. dark color is correct, but light is biased), and generally it is a mess
I know I need to delete app every time since launch screen is cached, are there any additional constraints? I fail to get any consistent results. Only thing that seems to work is "System background color".
Similar question goes for images.
OK, so short update. It is possible to use named colors and images with dark appearance on the launch screen after all.
It just works like nightmare. Which means that some parts are getting somehow cached (not sure what is happening underneath).
The final result is that to get consistent results, I had not only to delete app from the device, but also restart the phone.
I also noticed, that images with dark appearance are somehow broken - twice bigger or twice smaller, than their "any" appearance counterparts (even when I used exactly same files). That altogether creates unbelievable mess making it hard to test.
This is still a mess in iOS 13. I ended up using the build in dynamic system colours and tinting them with an overlay.

ios custom font with splash screen [duplicate]

I'm using a label to display text with my custom font on LaunchScreen.xib. My custom font shows up fine in the Interface Builder, but when I test it on my iPhone the font reverts back to the default font.
Not sure how to fix this or if it's a bug.
There's no big surprise here. The launch screen is shown at launch time - actually, before launch time - so the font probably hasn't yet loaded.
You could file a bug if you think you have a compelling use case. But I don't really think you do. Why are you showing any text in your launch image? It should be much more bare-bones than that - just enough to give the structure of the opening interface, which will be filled in when the opening interface actually appears. A "blank" screen with the same background color as the initial view controller's background color would be sufficient. You goal is just to provide an alternative to blackness.
A quick workaround is to use an UIImageView and have your text as UIImage on it, literally a picture of your text as .png / .jpeg or similar.
Note: It may take some time before you can see the image, I had to clean the Build Folder and reinstall the app a couple of times in order to see the image.
Another note: If you want to support multiple languages with different texts you will need to have different images for each language using this approach.

Setting next LaunchScreen during runtime

In my app the background color can be changed. Currently the LaunchScreen is just white and changes to the background color once the app has loaded. Is there any way that I can change the color that the LaunchScreen is going to have the next time the app starts. I know there is no way to run code while in the LaunchScreen, but maybe its image can be changed during runtime.
As said in the comment, it is impossible.

How to set dark background for iOS10 today widget

I'm trying to workout how to set the background of an iOS 10 today extension/widget to what looks like a default dark mode. In the image below you can see the Weather Underground today widget and it is dark. There are a few apps with a dark background and they all look like the same background/style so I'm thinking it maybe a specific dark mode that can be set in code rather than just fiddling with the view controller color/transparency - no matter how much I try to set the color and transparency manually in the story board I can't even get close to this effect.
You can't do this. The apps that look like this, are not updated for iOS 10 yet. You can see that it hasn't been updated, because it is expanded without showing the "Show less"/"Show more" button.

Launch image does not disappear upon initial app launch but does thereafter

I'm using Trigger.IO's toolkit to add the launch images. After doing so, the app fails to remove them from view after initially starting up the app. After hitting home and then going back to the app, the launch image disappears after launch.
The app isn't actually freezing after launch but just keeping the launch image at the forefront. I used a partially transparent image initially, and it appeared just to have a high z-index. I could use the app, but the launch image remained on screen over the top of everything.
As of platform version v1.4.20 you can control the launchimage visibility (http://docs.trigger.io/en/v1.4/release-notes.html#v1-4-20).
We've seen some instances of very early usage of the Forge APIs causing the launchimage not to show. In most cases, leaving the launchimage to hide itself manually is fine; if you're having problems or want more control over the launchimage, you can use forge.launchimage.hide.
Very odd, the problem seems to have dissipated even though I have not attempted to address it directly considering it was merely a config file change.
I'll report back if the problem surfaces again, but all is well currently!
Try add to use this code line
[window setRootViewController:mainController];
For full help, we need a some your codes

Resources