Views shifted way up

Hi. I have been unable to work on one of my iOS projects in Xojo 2018 and have been doing any updates on 2017 r2. When attempting with any version of 2018 r1.1 and above (just downloaded r3 today), the one screen in my app looks like this:

When it should look like this:

When using any version of 2018, this screen is shifted way up. The info at the top (score, question number, etc), the question, and first 2 answers are not being displayed. Only the last 2 answers are shown.

  • Is there something that has changed in 2018 that could be causing this?
  • I noticed each control has a Priority. From the few I’ve looked at, these are all set to Medium. Does this have an impact?
  • Does it have anything to with the fact that this view contains a scrollable container housing all of the top question details, the question, and 4 answers?
  • Because some questions and answers are larger in size than others, in order to get the labels to display properly, this view is also using a method (I forget who on the forum helped with this) that alters the size of the view scrollable area using a resizeDelegate. Could this be the problem?

I’m not sure where to begin searching. I want to use the latest version of Xojo and also don’t want to have to start all over from scratch, unless that’s necessary.

Details:
Mac OS 10.13.6
XCode 9.4.1
The images above are on iPhone 5s Simulator. When trying on iPad Air 2 Simulator, the contents in the Detail side of the screen split seem to be shifted to the left

Yes something changed with auto-layout in Xojo 2017r3

You should set all priorities to Highest.

the easiest way to do this is to save your project as XML, open in a text editor, replace all

<HLCPriority>0</HLCPriority> <HLCPriority>1</HLCPriority> <HLCPriority>2</HLCPriority> <HLCPriority>3</HLCPriority>
to

<HLCPriority>4</HLCPriority>

That seems to have done the trick! Thanks Jeremie! Do you (or anyone else) know why there are different priorities if we most likely need them to be set to highest? When would we want to use anything below highest? I looked over the Auto-Layout article in the LR but didn’t see anything that says when to use what priority

Can’t answer that one. Luckily, all my priorities have defaulted to Highest.

On another note, if you turn on LargeTitleMode for the View your title won’t get truncated and you can have a much longer back title as well. Looks good if you are willing to give up some vertical real estate.

You’re welcome!
Basically all auto-layouts should have the same priority. But because some self-inferred auto-layout properties might be hidden, it is better to use Priority=Highest unless you really know what you are doing.

You can translate highest with mandatory when it comes to layout constraints.
In theory, you can figure out a dynamic layout that under some circumstances develops conflicting constraints. In these cases, priorities may be helpful.
In practice, it’s often much easier to have separate layouts with all priorities set to highest instead of conflicting device/orientation constraints.