How do you create a splash screen for iOS in Viusal Studio 2017 using the storyboard editor

I have a xamarin forms app, on VS2017 on windows.

Specifically I would like to add a label that is centered for all different types of screens sizes, but I can't work out how to do it!!! does anyone know any links to handy tutorials? The ones I find are all out of date now...thx in advance fellow xamarinians

Best Answer

  • michaelwarnesmichaelwarnes US ✭✭
    edited June 2017 Accepted Answer

    @ShantimohanElchuri ..thanks very much for the info, you're getting close, and you are quite right about xamarin forms. the stroyboard in question is part of a xamarin.ios application.

    I'm using vs2017 and there is a storyboard editor built in, but the constraints seem buggy and I can't find a way to achieve the same constraints in the documentation you pointed to.

    I'm guessing that the storyboard editor doesn't work properly, thanks for your help, really appreciated.

    I guess plan B is to try opening the file in Visual Studio for Mac, or Xcode, where the interface doesn't proxy to the Mac Agent, and do it there.

Answers

  • michaelwarnesmichaelwarnes USMember ✭✭

    come on....no one has any ideas on this?

  • ShantimohanElchuriShantimohanElchuri USMember ✭✭✭✭✭

    @michaelwarnes I hope this guide "Sotryboard" will be useful.

    I got this by searching for "sotryboard" on Xamarin site.

  • michaelwarnesmichaelwarnes USMember ✭✭

    @ShantimohanElchuri...thanks for trying, but sadly that is no good, as it applies to xamarin.ios on a mac, my question specificlly applies to editing the LauchScreen.storyboard using VS2017 on windows. I'm guessing you haven't done that.

    Thanks for trying, it seems there is no documentation whatsoever covering this, perhaps some of those clever xamarin people know the answer....hint hint!!!

  • ShantimohanElchuriShantimohanElchuri USMember ✭✭✭✭✭

    Also another guide page for launch-screens, picked from another thread.

  • ShantimohanElchuriShantimohanElchuri USMember ✭✭✭✭✭

    @michaelwarnes said:
    @ShantimohanElchuri...thanks for trying, but sadly that is no good, as it applies to xamarin.ios on a mac, my question specificlly applies to editing the LauchScreen.storyboard using VS2017 on windows. I'm guessing you haven't done that.

    Thanks for trying, it seems there is no documentation whatsoever covering this, perhaps some of those clever xamarin people know the answer....hint hint!!!

    LaunchScreens are specific to platform. So if you create the launch screen on Mac this way it will work with Xamarin Forms also. I am not aware of any storyboard creator in VS2017. Yes you guessed it right. If it is available, I have not used it.

    And there is no single solution for launch screens in Xamarin Forms for all platforms. That much I am sure. Check if @JohnMiller answer in this thread is of any use.

  • michaelwarnesmichaelwarnes USMember ✭✭
    edited June 2017 Accepted Answer

    @ShantimohanElchuri ..thanks very much for the info, you're getting close, and you are quite right about xamarin forms. the stroyboard in question is part of a xamarin.ios application.

    I'm using vs2017 and there is a storyboard editor built in, but the constraints seem buggy and I can't find a way to achieve the same constraints in the documentation you pointed to.

    I'm guessing that the storyboard editor doesn't work properly, thanks for your help, really appreciated.

    I guess plan B is to try opening the file in Visual Studio for Mac, or Xcode, where the interface doesn't proxy to the Mac Agent, and do it there.

  • Joel.7378Joel.7378 USMember ✭✭

    @michaelwarnes - any luck on this? I'm having the same issue. The lack of good information on this is extremely frustrating.

  • DirkWilhelmDirkWilhelm USMember ✭✭✭✭

    Take a look at this Xamarin University lecture:

    It shows the creation of a launchscreen including setting the correct contraintst to center an image or label

  • DavidSynottDavidSynott USMember ✭✭

    This is for a mac. The question was very specifically about visual studio 2017 on windows.

  • GerryHGerryH USMember ✭✭✭

    this sort of worked https://docs.microsoft.com/en-us/xamarin/ios/app-fundamentals/images-icons/launch-screens?tabs=vswin

    But then, all it does is show the launch screen, LOL. I was hoping for more like a splash screen, that shows during startup, then switches to the main program.

  • SteveShaw.5557SteveShaw.5557 USMember ✭✭✭
    edited September 2018

    @GerryH - that article describes the launch screen storyboard that you add to your project's resources. After it runs, your regular startup code runs. That is, you should already have a working project with a Main method plus AppDelegate class, that refers to its own storyboard (or to a Xamarin Forms project). You add this second "launchscreen" storyboard to that project. The result should be the launch screen, then your main screen.

Sign In or Register to comment.