开发者

Can't open Tab Bar Controller in IB

开发者 https://www.devze.com 2022-12-20 23:01 出处:网络
I\'ve only just started learning to build iPhone apps using xcode. I\'m slowly getting the basics, but I\'ve come across a problem in Interface Builder.

I've only just started learning to build iPhone apps using xcode.

I'm slowly getting the basics, but I've come across a problem in Interface Builder.

When I create a new project using the Tab Bar Application template, I can't seem to do anything with the Tab Bar Controller in main.xib. When I double click the file, IB opens up fine, but there is no window to add/remove items to the view. If I drag a second Tab Bar Controller from the library, it opens u开发者_JAVA技巧p a window to edit the view, but does nothing else as it isn't connected. If I close the editor window and double click the new Tab Bar Controller icon in IB, it opens it back up but refuses to open up the original (connected) one when I double click that.

I'm more than happy to start completely from scratch with a basic Window application, but I can't find any resources to get me started with Tab Bar Controllers that don't simply use the xcode template!

I'd appreciate any help anyone can give.


Moving the TabBarController above the Window in the MainWindow.xib solved the problem for me, as pat suggested. The weird thing is while the TabBarController window is displayed, if I move the TabBarController in the .xib back below the Window item, the TabBarController window disappears.


I think I found a solution, to this problem:

When you double click on MainWindow.xib, Interface Builder open up and there is no window to add/delete items. Move the item "tabbarcontroller" before the item "window", then double click on "tabbarcontroller": you can see the window with the tab bar.

I hope it works for you!


You aren't crazy! I've been struggling with this problem all day. The first time it happened to me, the Tab Bar Controller window eventually opened behind the library window and I thought I had missed it that entire time. But when I had the problem later, the window was not hidden and nothing I did would bring it back. Eventually (many deleted and new projects later), I discovered that if you give the Tab Bar Controller icon a SLOW double click, that it would pop up.


Erm, after deleting and recreating the project a few times, opening different .xib files, clicking things, moving things, I think I have discovered that the window I couldn't open might have actually been open behind the library window and the inspector window which both always sit on top of the editing window.

I am suitably embarrassed but in my defense I'm a 20-year windows user and a 2 week mac user :)


Okay, so here I am working on my second iPhone app, starting over with a new tab bar application, and I have the SAME EXACT PROBLEM! This is so frustrating! Last time the slow double clicked worked, but this time it didn't.

What I finally wound up doing was dragging a new Tab Bar Controller over to the main window, and configuring that (just use the same exact configurations from the Tab Bar Controller that is already there). It worked like a charm!

0

精彩评论

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