Random Image for Launch Screen
You can set the UILaunchImageFile by a relative path and then put an image at the path and use your random.
For example you change the launchscreen after launching by setting UILaunchImageFile property in the info.plist. You would then write a random image to the Documents folder.
<key>UILaunchImageFile</key>
<string>../Documents/image.png</string>
Random launch-image for iOS and Android
I am going to use a temporary screen to show the splashscreen on react-native side.
On native side, I will be using a image icon.
so that when the app launches, you will see the icon followed by the temp screen followed by your Home screen.
Show random Splash screen
In this case, it's most common to show a "branding" company splash screen, and then once the execution gets into your app (appDidFinish…
) putting up a secondary splash screen with your customized/changing/animated image.
iOS - Some images not showing up in launch screen
Turns out that the physical device caches the images regardless if i removed the application or not. The only thing that actually worked was to 1. Remove the application and 2. Reboot the device. Only then the images would disappear. Don't know if this is a bug or not as of iOS 9.2
Generating a random default screen on iOS
You cannot change Default.png. Once the app is shipped - it's "set in stone". Until the next release, that is. The reason is simple (and same why you can't change apps icon). App's bundle is read-only. It is made read only because it is signed by you and by apple. Modifying the contents of the bundle would invalidate the signature.
How to show random splash screen (android)
Create an array with all your drawable ids, use nextInt to generate a value between 0 and length of array.
Then set it as background.
I didn't test it, but it should work fine.
int[] ids = new int[]{R.drawable.yourimage,R.drawable.yourimage2};
Random randomGenerator = new Random();
int r= randomGenerator.nextInt(ids.length);
this.yourImageView.setImageDrawable(getResources().getDrawable(ids[r]));
Related Topics
How to Change Searchbar Border Color
Using Cloud Code with the Parse Server and Heroku
How to Hide API Keys in Github for iOS (Swift) Projects
Rotate Image in Share Extension
How to Use Key-Value Coding in Swfit 4.0
Validate Jwt Token with Rs256 or Rs512 with Swift iOS
Create Navbar Programmatically with Button and Title Swift
Does Not Have a Member 'Instantiatewithowner'
How to Pass in a Void Block to Objc_Setassociatedobject in Swift
How to Handle Local Notification When App Has Been Terminated
How to Check If Device Orientation Is Landscape Left or Right in Swift
Swift Universal Framework Depending on Pod
Shift Avplayer Captions When Subview Overlaps Them
How to Add a Link for a Rate Button with Swift
Diffabledatasource: Snapshot Doesn't Reload Headers & Footers