views:

710

answers:

5

When I double click the XIB file in Xcode, Interface Builder typically launches a few different windows, one of which is the View window. For some reason, however, the View window isn't opening for one of my XIB files. If I open any of the other XIB files, however, the View window does open.

I'm not sure if there's a way to manually launch the View window (I looked through all of the menu items and couldn't find a way) or if I broke something in my XIB.

Update: I created a connection from the app delegate to a navigation controller, which seemed to break something. When I cleared that connection, the View window came back.

+1  A: 

Are you referring to the window which allows you to view the objects in your XIB, or are you referring to the window which represents your XIB's primary view or window?

If you're referring to the main window which allows you to view the objects in your XIB, it sounds like you're most likely corrupted. I say this because that window represents the XIB file in whole, and if it isn't open, the file's probably not open. (Pro tip: Check the Window menu and see if the file name is listed in the file list. If it's not, it's not open. If it is, it is open and perhaps off-screen -- this has happened to me in the past when I've switched from a multi-monitor setup to just the laptop screen.)

If you're referring to a View or Window inside the XIB, double-click its icon from the XIB's main window.

John Rudy
A: 

I double clicked it and nothing happened. It just selected the window, wherever it may be and that's it. I tried Window -> Bring all to front and nothing.
Finally, I managed to recreate the problem. Usually I keep Xcode on my main screen and IB on my other monitor. If I close IB with my UIView there, disconnect the external monitor then start IB again, the said view disappears. Maybe it just slipped somebody's mind until now. I tried enabling expose, but it wasn't on that screen either. I couldn't bring the view back until I connected the external monitor again.
Hope that helps!

Phreakazoid
A: 

I had the same problem. I fiddled with Deployment Target (changed from iPhone 4 to iPhone 3.2) and Development Target (changed from Interface Builder 3.2 to Interface Builder 3.0) for the xib file. It works wel now.

Amarsh
A: 

I had the exact same problem with opening a .xib file in Xcode and not being able to find the View window (that shows the application UI). Here was how I fixed the problem in my situation ... Open the .xib file, select the View object, go to the Tools menu and select Reveal in Workspace .. for me, this opened up the View window. Good Luck!

UPDATE - Or you can just double click the View object instead of going to the Tools menu - I think the first response suggested doing this, though that wasn't clear to me until after I posted this response.

Todd
A: 

I had the same problem, caused by disconnecting the second monitor. However, I'm now at another location so I can't solve the problem by plugging in the monitor again! Is there any other way to get that window back?

Mary Kay