0

I am stuck with a minor problem (which according to our testers is an issue), that is, the image provided for LaunchScreen gets cropped in iPhone X,* models.

I have been trying to render the image itself on storyboard from Attributes Inspector but it is of no use. Since coding isn't allowed for LaunchScreen, I can't change the UIImageView properties programmatically.

I have set the contentMode for the UIImageView to scaleAspectFill. And hence it gets cropped.

Is there any way to fit the image corner to corner for each iPhone model on LaunchScreen?

iPhone 6 displays the image perfectly but it's not a good thing for the iPhone XR screenshot provided here.

Please help!

iPhone 6

iPhone XR

rmaddy
  • 314,917
  • 42
  • 532
  • 579
  • 1
    Are you following safe are layout guide properly? If not then please check for safe are layout system also try changing the content mode of the `UIImageView` once to fit to check the difference inn another device. – onCompletion Jan 08 '19 at 09:16
  • @onCompletion Hi! I deliberately have fit the bottomAnchor of the imageView to SuperView so that it does not leave a white space under the safe layout margin. And ridiculously this crop problem occurs only for iPhone XR. Check the top left and right corners. The balloons have been cropped for iPhone XR screen. –  Jan 08 '19 at 09:20
  • 1
    Please add 1125 × 2436 size image for iPhone X models. – user2931321 Jan 08 '19 at 09:21
  • @user2931321 Hi! How do I actually add different images for pre-iPhone X and iPhone X models? Can it be done? –  Jan 08 '19 at 09:22
  • @KoushikMudi What is your image's resolutions? Please provide proper sizes for 1x, 2x and 3x. – onCompletion Jan 08 '19 at 09:23
  • 1
    @KoushikMudi yes, you can add. Check for iPhone X and set appropriate image to UIImageview. – user2931321 Jan 08 '19 at 09:24
  • @onCompletion 1x - 750x1,334, 2x - 1,242x2,208, 3x - 1,125x2,436 –  Jan 08 '19 at 09:26
  • @user2931321 Please tell me where I should navigate. The properties for the image in Assets, or the LaunchScreen storyboard or somewhere else? –  Jan 08 '19 at 09:27
  • 1
    If you are using a launch storyboard then you will need to ensure that there is sufficient area around your image so that detail isn't lost due to the cropping/scaling that will occur on different screen sizes. The alternative is to use different images, rendered specifically for each device type, in a launch asset catalog rather than using a launch storyboard. This is more time consuming as you will need to make multiple different images but it gives greater control over the image appearance. – Paulw11 Jan 08 '19 at 09:27
  • @Paulw11 Thank you! I'm going to try it now. –  Jan 08 '19 at 09:29
  • 1
    @user2931321 In Assets, `App Icons & Launch Images` – thedp Jan 08 '19 at 09:49
  • I just found that. Thanks a lot for your help! @user2931321 –  Jan 08 '19 at 09:53
  • @KoushikMudi good.. please upvote my comment. – user2931321 Jan 08 '19 at 09:56

0 Answers0