views:

753

answers:

4

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.

+7  A: 

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.

Todd Yandell
You'd man! It is fixed.It doesn't show up in expose, but inspector displays correct information.Then made a backup of the XIB and open the file as you suggested. Sure enough, there is a {{-583,120},{320,480}} string in the file. Changed it to {{0,120},{320,480}} restarted IB and it is now there.I have an external monitor at work. Maybe I moved the window to that monitor and expose/IB is not smart enough to bring it back to the main window when there is only one monitor.Thanks again!
skywalker168
This happens when you're using an external monitor and move the IB design view on the external display. Next time you're opening the XIB file without your external monitor plugged in, the design view position is still offscreen. Todd's solution works. Look for ">{{" values which are larger than your current screen bounds or even negative and correct them.
Colins
A: 

Hi - 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.

Neil
+3  A: 

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

jberryman
A: 

jberryman - your solution worked for me. I had downloaded an example and when I double clicked the .XIB file it came up in IB without the design view. double clicked the View icon, pressed CMD-w, and double clicked view again at there it was! Interested to know why this works - now I just have to remember it for next time... Thanks

ayreguitar