2012-10-04 368 views
5

有什麼辦法,以顯示對按鈕的點擊UISplitViewController如何在按鈕顯示UISplitViewcontroller點擊

+0

如何在烏拉圭回合應用 –

+1

檢查許多祭文支持這一http://stackoverflow.com/questions/7565054/ipad-split-view-call-load-from -another視 –

+0

肖像僅.... – THOMAS

回答

0

請使用以下代碼..

@interface ... 

-(IBAction)Btn_OpenSplitView:(id)sender; 

@end 

@implementation ... 

-(IBAction)Btn_OpenSplitView:(id)sender { 
    UIViewController* secondVC = [[UIViewController alloc] initWithNibName:@"ContentView" 
                    bundle:nil]; 

    UIViewController* firstVC = [[UIViewController alloc] initWithNibName:@"MenuView" 
                    bundle:nil 
               withContentViewController:secondVC]; 

    UISplitViewController* splitVC = [[UISplitViewController alloc] init]; 
    splitVC.viewControllers = [NSArray arrayWithObjects:firstVC, secondVC, nil]; 

    [self addSubview:splitVC.view]; 
} 

@end
相關問題