English 中文(简体)
B. 塔巴主计长兼导航主计长
原标题:Navigation Bar Layout Issue on Tab Bar Controller + Navigation Controller

I ve followed a how-to to create a simple Tab bar controller with a navigation controller in the first tab. Until here all is working correctly, expect a strange issue on the layout. When the app starts the first time, the Navigation Bar on the top of the first loaded nib is a little outside of the view. I cannot figure out why this happen. In the first view there is a button "Add new System" that opens a modal view. If I press this button and the modal view appears and then I dismiss the modal going back to the initial view, then the Navigation bar at the top is placed/refreshed correctly. The same happens if I press the second TAB (it s a simple nib without Navigation controller for now) and then back to the first TAB, the Navigation bar is placed in the correct position. Here a screenshot on the first startup:

“Startup”/

在这里,我发表模式观点或第二次意向书,然后回到第一种观点:

“After”/

该法典在网上的众多辅导员之一之后是一成不变的。 I m NOT使用故事板。 只有定制才能在航行律师协会的顶端增加 but子:

UIImage *editbuttonImage = [UIImage imageNamed:@"edit_pressed.png"];
UIButton *editButton = [UIButton buttonWithType:UIButtonTypeCustom];
[editButton setBackgroundImage:editbuttonImage forState:UIControlStateNormal];
editButton.frame = CGRectMake(0, 0, editbuttonImage.size.width, editbuttonImage.size.height);
[editButton addTarget:self action:@selector(leaveEditMode) 
       forControlEvents:UIControlEventTouchUpInside];

self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] 
                                          initWithCustomView:editButton];

[editButton release];
[editbuttonImage release];

No other modifications were made. The nib was used before in a single view. Then I ve tried to insert it into a TAB Controller + Navigation Controller. I could post the whole code in case it s needed. Under Select System there is a Table View, in these pictures empty, also not shown.

感谢你们的帮助!

页: 1

最佳回答

我先是解决这个问题。 首先,我准备掩盖现状,并再次在代表中展示。 该指令使用了:

[[UIApplication shareApplication] setStatus BarHidden:NO];

<>>后添加“NavController”作为子目。 另外,航行控制员停业也不属于观点,只是处于地位界限之下。

希望有助于:

Cheers, Simon

问题回答

暂无回答




相关问题
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 ...

热门标签