Search code examples
iosbackgroundxiblinear-gradientslaunch-screen

How to set linear gradient to background of LaunchScreen.xib in iOS


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>

Solution

  • 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