View Window Not Opening in Interface Builder - iphone

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.

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.

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!

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.

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.

I solved this problem by playing around with my display settings. I had my iPad connected to my MacBook using Air Display. Disconnecting the iPad with Interface Builder windows left on it seems to leave those windows in "la-la land." Even re-connecting the device didn't seem to work. I had to open the Display preferences, choose "Detect Displays" and then choose "Mirror Displays". After that I de-selected "Mirror Displays" and closed out Interface Builder. Opening Interface Builder again brought the window back, but it was on my external display.
I think this is a bug in the sense that Apple should figure out a way to put all the windows back on the main screen once you detach the external one.

Related

Xcode Base internationalization doesn't work

I'm trying to localize my app.
I noticed that if I add a language every localized file become doubled.
In this way it's impossible to maintain code or storyboard so I learnt that I need Base internationalization.
The problem is that when I select that checkbox in xcode project setting it shows a window without nothing to select, does anyone know how to fix this?
Here's a screenshot
First, you need to go to your storyboard file, open the bar on the right side, and go to Show the File Inspector, the furthest tab to the left. Then, scroll down and click localize. After this, when you check Use Base Localization, you should see the storyboard appear.
This could happen if Base Internationalization was active before then disabled and files deleted manually.
Create Base.lproj folder in your project folder using the finder.
Move your main story board to it also using the finder.
fix the reference to it from Xcode.
remove app. from device, clean & build your project.
All will be back to normal.

My recent changes in NIB file is not displayed in ios simulator-closed

I've applied changes in interface builder for my app which has labels in it. I just changed the name and position of a label and in addition to that I changed the font of a text view in my app. When I started to run my app, the font remains the same as previous one and none of the labels are displayed in it.
Can anyone help it pls?
in Xcode try this: main menu:product:Clean
if not enough: main menu:Xcode:preferences: -> click over locations icon:
click over the little gray right arrow for derived data:
that will show you the finder folder "DerivedData": delete it.
one other thing to try: in simulator, delete your app.
quite your xcode and then again open your project . Clear your build then run your code.
You should also make sure, that the interfacebuilder file is linked to the target you are starting in simulator.
To do this, select your xib and open the File inspector. There you should see a dropdown named "Target Membership" where you can link the xib to the targets you want.
Also be sure to have the labels defined as IBOutlets in your header file and link them correctly in your xib. Easiest way to do this is using the Assistant Editor and drag the outlet to the header file.
I had the same problem - but only on the iPhone non-retina in the simulator. Cleaning the code did not help. Restarting and rebooting did not help. But removing the app from the simulator worked. Now changes to my UI show up next time I run.
To remove the app from the simulator I did it just like on a real phone. I select the app icon with the mouse and hold it down the mouse button for a few seconds. Then the icon displays a small delete icon that you can select (the app icons shakes too).

iPhone app opens to black screen after refactor proj name in xCode 4

Guys, i wonder if any one can help - My project was fully working in both the simulator and on a device, however, i renamed the project in xcode 4 (double clicking at the root of the project navigation pane, it was happy to rename any references - but now when i launch the app it only opens to the main window (yes it has outlets, all have outlets etc etc),
no code in the app delegate stops at a break point (even in didFinishLaunchingWithOptions)
so unsure what i could have missed, i have looked at other answers and everyone writes and says "missing outlet" etc.
I have dragged some backed up version of the app delegate that used to work and no difference, what could i be missing.
I do have source control, however currently in the process of merging from VSS to GIT.
thanks
lee
Check your Info.plist for what it uses as it's Main Nib File. Perhaps something changed there? Also, within the nib file itself you might have problematic connections to classes that are still named with the old name.

new xib in xcode4

I develped an iPhone app. Now i would like to do it in iPad. To do this I have to create the new .XIB files and linked to his Class.
I don't know how to create a new .xib in xcode4. Could somebody help me?
Now, to solve this problem, I create a new file with his .XIB, delete the .m & .h and link the .XIB with my class.
Thanyou.
In order to create a XIB file in XCode 4, just go to the main menu, File->New->New File..., and from there choose User Interface from the iOS section. Then choose View (if that's what you want), device family and finally save.
Hope it helps.
We also need two more nib files, one for each of the two content views we just created. To create these, single-click the Resources folder in the Groups & Files pane so that we create them in the correct place, and then press ␣N or select New File... from the File menu again. This time, when the assistant window comes up, select User Interfaces under the iPhone OS
heading in the left pane .
Select the icon for the View XIB template, which will create a nib with a content view, and then click the Next button. When prompted for a filename, type BlueView.xib. Repeat the steps to create a second nib file called YellowView.xib. Once you’ve done that, you have all the files you need. It’s time to start hooking everything together.

XIB File Not Loading Properly In Interface Builder

I was creating a new View-based Application in XCode, adding some outlet and actions, using the IBAction and IBOutlet tags, into the automatically created controller view header file. I then double clicked the 'project_name_ViewController.xib' to launch the interface builder.
However the outlets and actions did not appear in interface builder. The only way I could get them to appear was the close the xib file and reopen it through file -> open command in Interface Builder it's self.
I recently upgraded to Snow Leopard, before that I never had this problem.
Has anyone else come across this?
Xcode is full of strange bugs. I always follow my 15 step arcane black magic ritual before I make an ad-hoc or release build. Any time something like your problem happens, I put it down to the flying monkeys twisting bolts somewhere in Xcode and restart the program (sometimes the computer). That generally fixes it.
Of course with outlets and actions, it's easy to forget to save the source header before you swap over. Make sure to save and build. Errors in the source can stop them from showing up in IB too.