2010-04-09 16 views

回答

1

好吧,你把你的段控制在你的導航欄後,你可以調用這個方法:

[segmentedControl addTarget:self action:@selector(callViewController:) forControlEvents:UIControlEventValueChanged]; 

然後,在你DetailViewController,添加方法:

-(void) callViewController:(id)sender { 
// .. 
// You can alloc/init your UIViewController and call it here 
} 

請記住添加 - (void)callViewController:(id)sender;在你的.h文件中。

編輯:請注意,所有這些代碼都在您的DetailViewController類中,該類正在管理您的SplitViewController的詳細視圖。

相關問題