English 中文(简体)
从表视图控制器推出时的黑色背景
原标题:Black background when pushed from tableviewcontroller

我有一个制表标签视图控制器, 它包含一个表视图控制器。 当你按一个表格行时, 它打开另一个表视图控制器( 如一个详细表格视图控制器) 。...... 我在右上方右上方有一个像“ 添加” 或“ +” 这样的导航按钮。 我想在按下 + 按钮时装入一个查看控制器, 但每次按下它时, 视图控制器只是一个黑色背景

AddSeasonViewController *stvc = [[AddSeasonViewController alloc] init];
//[self presentModalViewController:stvc animated:YES];
[self.navigationController pushViewController:stvc animated:YES];

[stvc release];

上述代码摘自表View Control的详情。

感谢任何帮助,请提前感谢!

问题回答

看起来你没有正确初始化视图

AddSeasonViewController *viewController = [[AddSeasonViewController alloc] initWithNibName:@"AddSeasonViewController" bundle:nil];

- & gt; 如果您在 UIItabBar 控制器中指定了 UIINAB 导航控制器, 您可以使用此操作

[self.navigationController pushViewController:viewController animated:YES];

- & gt; 我认为,在您的情况中, 您只是在给 UITabBar 控制器添加一个查看控制器, 然后推推

[self presentModalViewController:viewController animated:YES];
  [stvc release];




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

热门标签