# Screen Resolution in iOS Apps

**URL:** <https://forum.juce.com/t/screen-resolution-in-ios-apps/20562>\
**Category:** MacOSX and iOS\
**Created:** [January 12, 2017, 8:51am UTC](https://forum.juce.com/t/screen-resolution-in-ios-apps/20562 "2017-01-12T08:51:44Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![joe-04-04](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/joe-04-04/32/2566_2.png) [@joe-04-04](https://forum.juce.com/u/joe-04-04)\
**Post date:** [January 12, 2017, 8:51am UTC](https://forum.juce.com/t/screen-resolution-in-ios-apps/20562/1 "2017-01-12T08:51:44Z")

</div>

No matter what I specify my window in the “class” tab’s initial height and initial width of the Projucer, I can’t seem get the simulated version to match up with the GUI editor version. I’m trying to test on iPhone 7+, which is 1920 x 1080. If I use this, the simulator version is way off. I also read about the scaling, but don’t know how that affects it. Any tips on how to just have the simulator and real version, reflect the exact same size as the JUCE GUI editor?

Thanks

---

<div class="post-metadata">

**Author:** ![fabrizio](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/fabrizio/32/235_2.png) [@fabrizio](https://forum.juce.com/u/fabrizio)\
**Post date:** [January 12, 2017, 9:35am UTC](https://forum.juce.com/t/screen-resolution-in-ios-apps/20562/2 "2017-01-12T09:35:36Z")

</div>

[https://www.paintcodeapp.com/news/iphone-6-screens-demystified](https://www.paintcodeapp.com/news/iphone-6-screens-demystified)

The Ultimate Guide To iPhone Resolutions  
[https://www.paintcodeapp.com/news/ultimate-guide-to-iphone-resolutions](https://www.paintcodeapp.com/news/ultimate-guide-to-iphone-resolutions)

–  
edit  
The easiest way is to display the window in [in full screen](https://www.juce.com/doc/classResizableWindow#a08a0f1863417c80e6494d113a5c1fbd2) and use the [FlexBox](https://www.juce.com/doc/classFlexBox) class for layout

---

<div class="post-metadata">

**Author:** ![fr810](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/fr810/32/841_2.png) [@fr810](https://forum.juce.com/u/fr810)\
**Post date:** [January 12, 2017, 9:10pm UTC](https://forum.juce.com/t/screen-resolution-in-ios-apps/20562/3 "2017-01-12T21:10:54Z")

</div>

Also be careful that you are not missing launch images or that your launch images have the wrong size. JUCE will use whatever UIScreen returns:

> <https://stackoverflow.com/questions/21668497/uiscreen-mainscreen-bounds-returning-wrong-size>

Best to avoid LauchImages altogether and rather use launch storyboards if you can.

---

<div class="post-metadata">

**Author:** ![joe-04-04](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/joe-04-04/32/2566_2.png) [@joe-04-04](https://forum.juce.com/u/joe-04-04)\
**Post date:** [January 13, 2017, 2:14am UTC](https://forum.juce.com/t/screen-resolution-in-ios-apps/20562/4 "2017-01-13T02:14:14Z")

</div>

I came across that article, but I wasn’t understanding which resolution they were insinuating that we use. I must be missing something extremely critical because I’ve tried every resolution on the page under the iPhone 7+ and nothing translates correctly even remotely.

---

<div class="post-metadata">

**Author:** ![fr810](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/fr810/32/841_2.png) [@fr810](https://forum.juce.com/u/fr810)\
**Post date:** [January 13, 2017, 8:59am UTC](https://forum.juce.com/t/screen-resolution-in-ios-apps/20562/5 "2017-01-13T08:59:13Z")

</div>

So the size that JUCE will use on iOS for a fullscreen window is:

```
Desktop::getInstacne().getDisplays().getMainDisplay().totalArea

```

So try setting the width&height to the above in the GUI editor.

---

<div class="post-metadata">

**Author:** ![joe-04-04](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/joe-04-04/32/2566_2.png) [@joe-04-04](https://forum.juce.com/u/joe-04-04)\
**Post date:** [January 19, 2017, 9:35am UTC](https://forum.juce.com/t/screen-resolution-in-ios-apps/20562/6 "2017-01-19T09:35:36Z")

</div>

I found the setFullScreen(true) function call and placed it in the main window section and this does what I wanted, but I have no idea how to make this reflect in the GUI editor, so the GUI editor no longer reflects the same dimensions of the full screen app, which makes placing items a guessing game.

---

<div class="post-metadata">

**Author:** ![fr810](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/fr810/32/841_2.png) [@fr810](https://forum.juce.com/u/fr810)\
**Post date:** [January 23, 2017, 2:43pm UTC](https://forum.juce.com/t/screen-resolution-in-ios-apps/20562/7 "2017-01-23T14:43:42Z")

</div>

To know which size you should set your component to in the GUI editor, print out the width and height of:

```
Desktop::getInstacne().getDisplays().getMainDisplay().totalArea

```

while your running your program.

---

<div class="post-metadata">

**Author:** ![joe-04-04](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/joe-04-04/32/2566_2.png) [@joe-04-04](https://forum.juce.com/u/joe-04-04)\
**Post date:** [January 24, 2017, 8:59am UTC](https://forum.juce.com/t/screen-resolution-in-ios-apps/20562/8 "2017-01-24T08:59:17Z")

</div>

WOW, I finally understood what you meant, my apologies! I printed out the screen dimensions and found it to be 320 by 568, perfect! Next step (down the road) will be to figure out scalable GUIs, but this is perfect for right now. Thank you!

---

<div class="post-metadata">

**Author:** ![joe-04-04](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/joe-04-04/32/2566_2.png) [@joe-04-04](https://forum.juce.com/u/joe-04-04)\
**Post date:** [April 11, 2017, 11:53pm UTC](https://forum.juce.com/t/screen-resolution-in-ios-apps/20562/9 "2017-04-11T23:53:41Z")

</div>

Coming back to this app after some time…

So I ran my code in a few different simulators of different iPhones with different dimensions, to see how my GUI would look. Much to my surprise, the GUIs perfectly fit all the models I ran it on. I didn’t do any coding to make the GUI scalable, is this some coincidence or a thing JUCE does automatically for iOS builds?

Or maybe my understanding of the simulator isn’t that great, I’m assuming its running the GUI exactly how it would if it were on that specific device. At any rate, they look correct on iPhones 5 through 7, yet I didn’t do anything specific to make it scalable.

---

<div class="post-metadata">

**Author:** ![matkatmusic](https://avatars.discourse-cdn.com/v4/letter/m/dfb087/32.png) [@matkatmusic](https://forum.juce.com/u/matkatmusic)\
**Post date:** [August 14, 2018, 8:42am UTC](https://forum.juce.com/t/screen-resolution-in-ios-apps/20562/10 "2018-08-14T08:42:39Z")

</div>

> [@fabian](#):
>
> Best to avoid LauchImages altogether and rather use launch storyboards if you can.

@fabian  
What’s the workflow with regard to projucer when it comes to this? Once we’ve made our iOS export from Projucer, just stop using Projucer for project file management and stick with xcode entirely?

---

<div class="post-metadata">

**Author:** ![matkatmusic](https://avatars.discourse-cdn.com/v4/letter/m/dfb087/32.png) [@matkatmusic](https://forum.juce.com/u/matkatmusic)\
**Post date:** [January 10, 2019, 7:18am UTC](https://forum.juce.com/t/screen-resolution-in-ios-apps/20562/11 "2019-01-10T07:18:20Z")

</div>

@fabian bump

---

<div class="post-metadata">

**Author:** ![ed95](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/ed95/32/7635_2.png) [@ed95](https://forum.juce.com/u/ed95)\
**Post date:** [January 10, 2019, 10:18am UTC](https://forum.juce.com/t/screen-resolution-in-ios-apps/20562/12 "2019-01-10T10:18:10Z")

</div>

See [here](https://forum.juce.com/t/homebar-on-new-ipad-pro-3rd-gen/31149/2?u=ed95).
