ECSlidingViewControllerを使用しています。
サンプル プロジェクトでは、IBAction
を使用して最初のビューにボタンを追加しました (スライド アウト ナビゲーションを使用せずに) 最初のビューのボタンを 2 番目のビューに移動します。
- (IBAction)btnPressed:(id)sender {
UIViewController *newTopViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"SecondTop"];
[self.slidingViewController anchorTopViewOffScreenTo:ECRight animations:nil onComplete:^{
CGRect frame = self.slidingViewController.topViewController.view.frame;
self.slidingViewController.topViewController = newTopViewController;
self.slidingViewController.topViewController.view.frame = frame;
[self.slidingViewController resetTopView];
}];
}
このコードでは、ナビゲーション スライド アウト メニューにのみ移動し、2 番目には移動しません。