English 中文(简体)
塔巴似乎被锁定(过失环境)
原标题:Tab bar seems to be locked (default settings)

我使用XCode 4.2中的接口建筑商,建立了<条码> 禁制器<>。

但是,当我提出申请时,刺刀似乎被锁定,我可以选择另一条tab。 为什么如此?

PS:In t改变了XCode的表格或-tabbar Controller的任何财产。

最佳回答

道歉——假设是因为你使用XCode 4.2,你使用故事片。 或许,你可以尝试在法典中充分使用禁制控制器,而不是完全使用国际管制局。 这就是我通常如何这样做。

// Create the main tabbar controller
tabbarController = [[UITabBarController alloc] init];

// Create the first view controller
MyFirstViewController *v1 = [[MyFirstViewController alloc] initWithNibName:@"MyfirstViewController" bundle:nil];
[v1 setTitle:@"Tab1"];

// Create second view controller
MySecondViewController *v2 = [[MySecondViewController alloc] initWithNibName:@"MySecondViewController" bundle:nil];
[v2 setTitle:@"Tab2"];

// Make an array of controllers for the tabbar
NSArray *tabbarControllerArray = [NSArray arrayWithObjects:v1, v2, nil];

// Set the view controllers used by the tabbar controller
[tabbarController setViewControllers:tabbarControllerArray];

// Release views (retained elsewhere)
[v1 release];
[v2 release];

// Add the controller to the subview
[window addSubview:[tabbarController view]];

// Make key and visible
[self.window makeKeyAndVisible];

这样做会打上枪,看看你是如何接手的。

问题回答

你们如何建立禁忌? 您是否具有初步看法,然后去Edit menu->Embed In-> Tabbar 主计长,或者你是否开始在刺酒吧控制器中做任何事和rag?

Either way, I just created a project with a single view and tried both ways - but the tab still worked. (if you do it by dragging the tab bar controller from the utility pane, you have to also select is initial view controller if you replace the original view created with the project.

缩略语

您并不真正需要综合您的“评价”中的表象控制器——故事片将对此予以关注,而且你可以在不需要生成的合成器的情况下从法典中参考。 只是设计故事板中的布局,首先在禁忌控制器上拖 ((这将自动造成两名观察控制员违约)。 然后,在公用事业小组下选择了制片控制器,然后看看看管器检查箱。 确保检查。 然后管理你的项目。





相关问题
How to change out-of-focus text selection color in Xcode?

Okay, I ll bite. I ve got really pleasant code/window colors set up in Xcode. Ordinarily, my selection color is very visible. When I am doing a project search and iterating through the results, ...

Iphone NSTimer Issue

Hi I am new to objective c. I am trying to make an app for iphone. I have a button on my view, and the click on which the function playSound is called. This is working properly. It does plays the ...

Include a .txt file in a .h in C++?

I have a number of places where I need to re-use some template code. Many classes need these items In a .h could I do something like: #include <xxx.txt> and place all of this code in the ....

Iterating over string/strlen with umlauted characters

This is a follow-up to my previous question . I succeeded in implementing the algorithm for checking umlauted characters. The next problem comes from iterating over all characters in a string. I do ...

Xcode open two editor windows with same file

Is it possible to open the same file in two separate windows in Xcode. I can open a file in one window and the same file in the main Xcode editor window, but I wanted two separate fulltime editor ...

Forcing code signing refresh in Xcode

In our environment, we share resources across multiple projects and platforms. When building for iPhone, only a subset of those resources are needed. Since that subset is still considerable, we have ...

热门标签