Xcode Interface Builder crashes when I edit storyboard

前端 未结 4 2063
挽巷
挽巷 2020-12-07 01:01

I\'m new to Xcode and am having problems with the IDE crashing when I use the Interface Builder. This is Xcode 4.5.

It worked properly for long enough for me to add

相关标签:
4条回答
  • 2020-12-07 01:19

    This problem likely has something to do with the now two different sized iPhone retina displays (3.5" and 4") and how that interacts with a view's Mode:Scale To Fill and perhaps Autosize Subviews, also -- both of which are enabled by default.

    For example, in my case I had a 4" retina sized MainView with tightly packed button views. But the emulator was set to 3.5 retina display. Because my button views were only 43x43px in size and spaced right next to each other, this would cause the button positions to auto-down-scale in such a way that they overlapped, when their positions were adjusted for the 3.5" display (Scale To Fill a smaller space) -- since they could not shrink in size. This overlapping of views seems likely to cause problems in the auto layout system. Hence the crash, I think.

    This will also no doubt be why there is some reference to communicating with the emulator in the crash report, even though we're only working in Interface Builder, which did not previously seem intuitive.

    0 讨论(0)
  • 2020-12-07 01:26

    When xib files are in different formats, but are all in the same project, this will happen. In my case, some xib files were compatible for xcode5 dp, but others were for xcode 4.6

    The object here is to look for differences in xib files

    Hope this helps people in the future!

    0 讨论(0)
  • 2020-12-07 01:27

    I got this error aswell, for me the problem was a TableView that had some constraints left. After deleting all constraints the error stopped showing up.

    0 讨论(0)
  • 2020-12-07 01:31

    Update: Further experimentation revealed the 'Use Autolayout' checkbox for the storyboard. Switching this off then saving the file seems to have fixed the problem. I can edit at will, with no more crashes.

    0 讨论(0)
提交回复
热议问题