开发者

Design view disappeared from Interface Builder

开发者_C百科

All of a sudden, the visual design window disappeared from my Interface Builder. It is a regular UIView, has some UIImageView, UILabel, and UIButtons on it. When I open IB, I can see the document window (with File's Owner, First Responder and View in it), Library and Inspector, but the visual design window disappeared. Double click on "View" in the document window doesn't do anything. If I go to List mode, I can see all the components on the view, but just can no longer find the visual design window. All other XIB can open just fine, only this XIB lost its design window.

First I thought maybe it was hidden somewhere on the screen. Tried all kinds of things, even rebooting the computer, but nothing helped.

Can anyone help? Thanks in advance! By the way, I'm running SDK 3.2 Beta 3.


Does it show up in Exposé? Does the inspector show its properties when you double click on the view? I’m just wondering if the view’s editor window has somehow been moved offscreen.

Here’s an idea. XIB files are just XML. You should be able to open it in a text editor and change the window’s location. Search for the string “>{{”, which should match against encoded NSRects. See if you can find a rect with an origin that would put it offscreen.


For whatever reason what worked for me was: double click the "View" icon, press CMD-w, double-click "View" again.


Just right-click (or ctrl-click) at the .xib or .storyboard and choose: Open As > Interface Builder.


very new to Xcode & interface builder - I had a similar problem and came across this page whilst searching for solutions. I found that by going to the 'document' window and dbl clicking on the 'window' icon, brought the design view of the window back.


Simply expand the side outline view pane if not already open (triangular arrow in a circle at the bottom left of the IB pane), then open and expand the object hierarchy and click in any one of the view objects. It will select it and center it into the view. That will miraculously make the whole view reappear. At least worked for me in Xcode 4.3.3 and Xcode 4.5.2. I certainly got scared the first time it opened on a blank view though, I thought it had lost the design. But it was just off screen with no scroll bars to get to it (in my world it's called an XCode bug). I like Todd Yandell's solution to edit the file as a permanent fix, but it's more work...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜