私は長い間グーグルしていますが、解決策が得られません.iOS 5.1では、マスタービューは右スワイプで表示され、左スワイプで消えます。
詳細ビューのボタンクリックでマスタービューをロードしたいのですが、どうすれば可能ですか?
以下のコードは私のために働いています.マスタービューは非表示ですが、マスタービューの黒い画面サイズはマスタービューの代わりに残ります.
- (void)hideMaster:(BOOL)hide {
AppDelegate *appDelegate=(AppDelegate *)[[UIApplication sharedApplication] delegate];
UISplitViewController* spv = appDelegate.splitViewController;
spv.delegate=self;
self.hiddenMaster= hide;
[spv willRotateToInterfaceOrientation:self.interfaceOrientation duration:0];
[spv.view setNeedsLayout];
}
- (BOOL)splitViewController:(UISplitViewController*)svc shouldHideViewController: (UIViewController *)vc inOrientation:(UIInterfaceOrientation)orientation {
NSLog(@"Spv: I do %@show the master", (self.hiddenMaster?@"not ":@""));
return self.hiddenMaster;
}
前もって感謝します