Xcode Interface Builder crashes when I edit storyboard

前端 未结 4 2062
挽巷
挽巷 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.

提交回复
热议问题