Xib files in Xcode 8.2 do not work properly. This is mistake?

I am really upset since I migrated my project from Xcode 7.3 to Xcode 8.2. I use both a storyboard and Xib files in my project. When starting my project, I get this strange error. Some of my xib files are being resized or resized (compressed to fit / expanded in size). All of these Xib files worked 100% perfectly in Xcode 7.3.

ScreenShot: screenShot

As you can see above, the xib controller looks the same as on the Iphone5. But during operation, it expands to blue lines. I am absolutely sure that the machine is correct. I solved this by changing the opening type of the xib document from Xcode8 to Xcode7, but not getting a good effect. Seems to be repeated over and over. In the above arrangement, my views are arranged like this. Why is this happening. This is mistake

Already tried: Link

ScreenShot: enter image description here

+5
source share
3 answers

This is an xcode error. You must set the frame correctly. One of the reasons this happens at run time is because you are not setting the frame correctly.

+2
source

This is a known bug in Xcode. Your best option is to upgrade to Xcode 8.3 and port your Swift 2.3 to 3.1.

+1
source

Xcode 8 strongly recommends using size classes with a generic layout designed using AutoLayout restrictions. This helps in the development of a user interface to support all families of iOS families, and also supports all device orientations. XIB files should be used as links and use the same user interface controls in the storyboard user interface views.

+1
source

Source: https://habr.com/ru/post/1266751/


All Articles