AutoLayout constraint issues in iOS 10, XCode 8

2019-09-16 13:30发布

问题:

As I have developed the iOS application using Xcode 7.3. When reviewing the AutoLayout constraint on the device which having iOS 10 using Xcode 7.3 it properly display it but when using the Xcode 8 and then reviewing on the device then it does not show properly.

So my question if I am deploy the application on the AppStore using Xcode 7.3, so there is any chance that the AutoLayout constraint do not show properly in iOS 10.

Any help is much appreciated.

回答1:

I am having the same issues in one of my iOS application as the constraint works in Xcode 7.x but not in Xcode 8, so I have found some work around for resolve it. Please find the below steps.

1) Open your storyboard in Xcode 8, then it popup regarding choose an initial device view, please select one of the option and then click on Choose Device. Please find the below GIF representation for same.

2) When you complete your changes, select the storyboard, go to File Inspector, on Interface Builder Document section, select the Opens In field and apply the Xcode 7.x. After that it popup regarding save so please select "Save and Close" option when it is prompted. Please find the below GIF representation for same.

3) Close the Xcode and then open the application.

Your storyboard changes will be saved, and your storyboard will function as it did on Xcode 7.x.

Hope it works for you!!!



回答2:

The build given by Xcode 7.3 will not affect for constraint issue on iOS10.