This is a read-only archive of the Framer Community on Facebook.

What is Framer? Join the Community
Return to index
Josef Richter
Posted May 20 - Read on Facebook

Has anyone figured out iPhone 6+ / @3x scaling yet?

I tried checking screen width (is there better way?) and then Framer.Device.setContentScale(1.5) – it seems to work in Framer Studio, but for some reason not on actual iPhone 6+. And I don't have 6+ device so it's difficult to test. Can anyone help please?

14 Comments

Jakub Heglas

Why would you scale? Always define sizes in @1x — iPhone 6+ does the same thing as any other @2x iDevice.

Josef Richter

coz in Framer you work with actual physical pixels on the device.

Josef Richter

hmm, and setContentScale works only in 0-1 range..

Jakub Heglas

Wat. It's been a while I last time checked on Framer. Physical pixels is plain dumb for both design AND development, so I wouldn't expect that.

Guys?

Thomas Carlson

Josef Richter In a recent project I used the bit of code below to detect difference from the initial scale. From my experience this also worked in reality. If my Sketch template is 750px wide, I divideSscreen.width with 750 and thereby get the scale for contentScale. See below.

scaleSize = Screen.width / 750
Framer.Device.contentScale = scaleSize

Josef Richter

Thomas but that doesn't work for iPhone 6+, does it? As I wrote, you cannot set contentScale > 1 according to docs…

Thomas Carlson

Been awhile since I tested on a 6+ since I don't have one myself - pretty sure it worked - but if docs says it doesn't, I probably remember it wrong. In that case (and if iPhone 6+) is a must, then I'd build template/Sketch files for that and then scale down, though this obviously adds extra work. The best fix would probably be to change contentScale to allow for scales above 1.0.

Dohyeon Kim

You could try setContentScale(scale, true). This workaround will let you set the scale > 1.

Jordan Robert Dobson

Yeah it's a mess.

Josef Richter

For the record: setContentScale(scale, true) does work. But I needed to test Screen.width > 750 because the actual iPhone 6+ returns screen width 1125 instead of 1242 for some reason..

Jakub Heglas

Josef: maybe a suggestion (just guessing really). iPhone 6+ can operate in 2 display modes, normal and "large" (which technically is identical to regular iPhone 6).

Therefore
750 / 2 = 375 (iphone 6)
1125 / 3 = 375 (iphone 6+ in "large" mode)

So it depends on what did user explicitly set in their preferences.

Jakub Heglas

Josef Richter

great. that probably explains it (y)

Jakub Heglas

Thats the reason why I dont like that framer cant operate in point system, instead of actual pixels.

Read the entire post on Facebook