Is an auto market all or nothing in the storyboard?

I am working on a corporate iPad client application that has a rather complex view controller hierarchy. Recently, I had to implement a redesign in the start-up view of the application, in the form of a server login. I decided to take the opportunity to implement a redesign using an automatic layout and leave the rest of the application unchanged. After several days of watching WWDC videos and hacking the code, I had a smooth animated movement of input text fields for rotation, as well as show / hide events. Satisfied with the results, I git merged the refactoring branch, only to find the application crashes when using the application after login, without the debugger prompts. Finally, I realized that the automatic layout was somehow cascaded to the child container controllers.

Main.storyboard has a β€œmain” navigation controller, which has a root view controller RootViewController, the view of which is a container for the views of the child view controller, starting from the login window, and then replaced with any last controller that was used by the last User. After refactoring in IB, the login controller checks the "Use autorun" checkbox. But suddenly one of the child controllers was checked, which did not include autorun. When I remove it on this controller, the autostart flag of the login controller is suddenly disabled. Does this mean that the automatic layout is on / off on ALL view controllers in the storyboard? If not, does anyone know what is going on? Xcode 4.6

+4
source share
1 answer

From KMT on the Apple developer forums, they replied that automatic layout was enabled at the storyboard level. I somehow missed this critical bit in WWDC files.

I solved my specific problem by creating a new storyboard file with "Use autorun" enabled and moved my autorun viewers to it. Unfortunately, in the process of discovering that Autolayout is enabled at the storyboard level, it was understood that whenever I unchecked the "Use autorun" box on any object in Main.storyboard, IB applied best guessing restrictions to replace existing springs / struts attributes, which I had previously installed. And then, unchecking the "Use autorun" box, he applied the best-guess springs / struts attributes to replace his best guess limits. As a result, I had to reapply the springs / struts settings to many views in the storyboard file.

+3
source

All Articles