2011-04-07 40 views
1

我有splitview,它包含rootviewcontroller(uitableviewcontroller子類)和detailview(viewcontroller子類)。 現在我在rootview(tableviewcontroller子類)中擁有這樣的代碼。在splitview中導航到detailview中的另一個視圖,但該新視圖的SIZE需要整個屏幕

- (void)tableView:(UITableView *)aTableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { 

if (delegate != nil) { 
    [delegate viewchange]; 
} 

}

和detailviewcontroller(在右側的ViewController子類)。

-(void)viewchange{ 

nextviewcontroller *新思維= [[nextviewcontroller的alloc] initWithNibName:@ 「nextviewcontroller」 束:無];

[nextView.view setFrame:self.view.bounds]; 
[nextView setModalTransitionStyle:UIModalTransitionStyleFlipHorizontal]; 
[self presentModalViewController:nextView animated:YES]; 

[nextView release]; 

}

和導航通過選擇rootview行成功發生但新思維出現在整個屏幕,將隱藏rootview控制器的視圖(實現代碼如下)所以,我怎麼能顯示在左側和navigatation rootview只在detailview的大小右側?

thanx的任何幫助。

回答

1

我不知道我的回答是否是正確的答案,但我會嘗試...

我看到你用「presentModalViewController」視圖帶來... 根據這個文件, click here它說,

模態視圖控制器的視圖以全屏

總是呈現所以我想這就是爲什麼你的觀點是在全屏到來。如果你想使用Modal視圖控制器,它說,對於Ipad,你可以使用modalPresentationStyle屬性來更改演示文稿類型,該屬性可以通過此鏈接modalPresentationStyle訪問。

看一看,看看它是否可以幫助你。

此外,如果您已經找到問題的答案,請張貼它,以便它可以幫助其他人遇到您的問題。

+0

你是正確的,感謝名單抽空爲此,陸氏像我需要導航控制器和我試圖UIModalPresentationPageSheet,UIModalPresentationFormSheet,全屏幕的問題消除,但是那架新視圖是在中間,所以我會盡量多試一次。\ – Dhawal 2011-04-08 08:50:54

+0

沒問題..如果你覺得答案是正確的,儘可能接受答案......你可以通過點擊答案附近的「勾號」來做到這一點...... – learner2010 2011-04-08 14:06:36

+0

是的,導航控制器的工作到最後。 – Dhawal 2011-04-09 16:17:32

0

我有同樣的問題

全屏問題消除,但新的觀點的框架是在中層 ,所以我會嘗試更晚

可以爲您發佈您的代碼?我試圖設置框架,但沒有發生:

-(void)showFlipView 
{ 
    UIViewController *controller = [[UIViewController alloc] initWithNibName:@"FlipsideView" bundle:nil]; 
    //controller.delegate = self; 
    controller.modalPresentationStyle = UIModalPresentationCurrentContext; 
    controller.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal; 
    [controller.view setFrame:self.view.bounds]; 
    /*controller.view.frame = CGRectMake(300.0, 
             0.0, 
             self.readerDetailView.frame.size.width, 
             self.readerDetailView.frame.size.height); 
    */ 
    [self presentModalViewController:controller animated:YES]; 

    [controller release]; 
} 

編輯:解決!我必須設置幀動畫AFTER:

相關問題