Imageview filling whole storyboard

EwoudvdWerfEwoudvdWerf USMember ✭✭✭

How can I make an imageview fill the whole storyboard (on all devices)(for a launchscreen), I'm using Visual Studio, and can't seem figure it out

Answers

  • TedRogersTedRogers USMember ✭✭✭✭

    hmm...set constraints on all four sides of your image view to main view. Set ContentMode to ScaleToFill.

  • EwoudvdWerfEwoudvdWerf USMember ✭✭✭

    @TedRogers I have set the constraints of all four sides like this, but it still didn't work

  • TedRogersTedRogers USMember ✭✭✭✭

    what are you seeing? Can you post a pic?

  • TedRogersTedRogers USMember ✭✭✭✭

    What I meant was what does it look like at runtime. Your constraints look fine as long as top,left,bottom,right are all zero. When you change the viewing size I don't think iOS designer changes the imageview size for you automatically but should still work fine at runtime.

  • EwoudvdWerfEwoudvdWerf USMember ✭✭✭

    @TedRogers well this is how it looks like on an iPhone 7 plus

  • TedRogersTedRogers USMember ✭✭✭✭

    That looks like you don't have ContentMode set to ScaleToFill.

  • TedRogersTedRogers USMember ✭✭✭✭

    if that doesn't do it, you can private message me a test project and I will take a look.

  • EwoudvdWerfEwoudvdWerf USMember ✭✭✭

    @TedRogers I have made a test project and made a storyboard with the same settings and it worked, but it still doesn't work in my main project.
    Maybe its interesting to note that my main project is a Xamarin.Forms project and the test project is a Xamarin.iOS project, but this doesn't bother the storyboard files does it?

  • EwoudvdWerfEwoudvdWerf USMember ✭✭✭

    @TedRogers Nevermind, for some reason it suddenly works now

  • JamesMallonJamesMallon USMember ✭✭

    For anyone reading this now, Clean and then build the app.

Sign In or Register to comment.