Is there any way to set linear gradient to background of LaunchScreen.xib in iOS? Something like background="linear-gradient(#000000, #123456)"
?
<view contentMode="scaleToFill" background="...">
<rect key="frame" width="753" height="867"/>
</view>
Linear Gradient - Transparency To add transparency, we use the rgba() function to define the color stops. The last parameter in the rgba() function can be a value from 0 to 1, and it defines the transparency of the color: 0 indicates full transparency, 1 indicates full color (no transparency).
You can create a vector image (pdf) with a gradient, add an ImageView to launchscreen and set that vector as the image.
If the image doesn't show up, clear the Xcode cache, restart Xcode, delete the app from your device, restart the device, and then it should show up.
You can't add custom code on LaunchScreen, so the alternative to achieve this is to use an ImageView
Try to look at iOS 8 - Background gradient for launch screen file
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With