Libin Joseph
Libin Joseph

Reputation: 7362

Xamarin iOS LaunchScreen with gradient background

How do I add a gradient background to a LaunchScreen storyboard? I read in the ios document that LaunchScreen storyboards do not support custom classes, and if I am correct Storyboards directly don't support background gradients.

Is it possible to achieve this? If we can, it will be great if someone could give me an idea.

Upvotes: 2

Views: 1480

Answers (1)

Kevin Li
Kevin Li

Reputation: 2258

You can't run code or use custom classes in LaunchScreen.storyboard. You can refer to Launch Screens on this.

For a storyboard to be used as a launch screen it must include only simple, built-in UI elements and cannot do any calculations or be based off of a custom class.

So, the best solution is to add a gradient image in it. Just notice that the image needs to adapt to all the iPhone screens.

Upvotes: 2

Related Questions