2011-03-30 55 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

相關問題