2011-03-30 84 views
0

我做了一个应用程序有一个导航控制器,应用程序工作正常,但在一个UIView我有一个UITableView。iOS - 查看未打开(导航控制器应用程序)

Example of the application

当推电池,我需要打开新的看法。我在didSelectRowAtIndexPath中试过这个:

NextViewController *nextView = [[NextViewController alloc] initWithNibName:@"NextViewController" bundle:nil]; 
[self.navigationController pushViewController:nextView animated:YES]; 
[nextView release]; 

但是视图无法打开。我想这太:

NextViewController *screen = [[NextViewController alloc]initWithNibName:@"nextView" bundle:nil]; 
screen.modalTransitionStyle = UIModalTransitionStyleCrossDissolve; 
[self presentModalViewController:screen animated:YES]; 
[screen release]; 

现在它是开放的,但位置不正确,观点是在顶部导航栏和标签栏和视图的一部分被隐藏。

如何正确打开视图?

编辑:

我把Ø疗法的UIButton在其他的UIView打开其他次要的UIView和不工作。我完全困惑。

回答

0

你需要重新设计你的观点正确地显示,当为模态的视图中显示

+0

我不想将其作为模态呈现。我不明白为什么正确的方式不起作用。 – JSanchez 2011-03-30 14:06:42

+0

self.navigationController的值是什么? – JFoulkes 2011-03-30 16:08:01

0

使用这种验证乌尔笔尖文件的名称为NextViewController正是

NextViewController *新思维= [[NextViewController页头] initWithNibName: @“NextViewController”bundle:nil];

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

[NextViewController release];

+0

我写这篇文章时错了。我只是编辑。该程序按照您的说法设置,不起作用。 – JSanchez 2011-03-30 14:02:26

+0

删除NextViewController nib然后创建并给出该nib的新名称,然后将该新名称替换为extViewController * nextView = [[NextViewController alloc] initWithNibName:@“urnewNamehere”bundle:nil]; – 2011-03-30 14:11:11

+0

相同,不起作用。 – JSanchez 2011-03-30 15:32:40

相关问题