Asset dimensions problem

@Abdo23

  • Didn’t see a question in that last post. 
  • Suggestion: Can I suggest you use the borderless view (1125x2436)?
    • I never use the framed views and I think at one time the iPhone X view had an issue.  It is probably fine, but may be worth trying to be sure.
    • View -> Borderless -> iPhone @3x 1125x2436

@Rob -

  1. What!?  Feels so archaic.  I must just be biased.

  2. Noted.

  3. Yes!  I keep forgetting, widget.* is somewhat dependent on 320x480 as a basis.  (I use SSK2 easyIFC so I often forget about widget.* details, except when I find myself needing a slider which SSK no longer supports.)

@Abdo23

The algorithm I wrote above works perfectly and as expected.  I can only guess you’re doing something differently from me.

Did you make a tiny standalone project to explore this or are you doing this in your game? 

Advice: Never debug ideas in an existing project.

Here is a stand-alone example showing it working:

https://github.com/roaminggamer/RG_FreeStuff/raw/master/AskEd/2018/05/fitAnyDevice.zip

I have a handy stand-alone project just for this kind of debugging:

https://github.com/roaminggamer/RG_FreeStuff/raw/master/AskEd/askEdStarter.zip

This might help with the Apple stuff a bit:

https://www.paintcodeapp.com/news/iphone-6-screens-demystified

https://www.paintcodeapp.com/news/ultimate-guide-to-iphone-resolutions

But all that said, your content area is your content area. If you want a 1x1 go for it. If using a 16:9 content area works better than a 3:2, go for it. Maybe it makes sense for you to do 1080x1920 and really modernize your settings. That’s cool too.

Just understand that Apple seems to be stuck in this 320 point world and the impact it has on widget.* (and really only just a few are not scalable).

Rob

This example accounts for the notch and treats the screen as if it ends at the notch edge:

https://github.com/roaminggamer/RG_FreeStuff/raw/master/AskEd/2018/05/fitAnyDevice_removeNotch.zip

Note: When you run this, there will be a gap between the black art of the notch and the first blue block. 

Why?  Probably because the simulator is approximating the frame.  You need to run this on a PHYSICAL device to test it.

Note 2 : All this nonsense is why I HATE notches (not just Apple is guilty of this).

(Personally I would ignore the notch, or define a broad fixed-size safe-area.  Relying on your ability to cope with every possibility of insets will be a challenging task.)

Taking what Rob said into account I think I will stick with 320x480. Anyways, everything is working fine now.

Thanks a lot. Appreciate all your effort :slight_smile: