UINavigationController/フリックで親画面に戻らないようにする


iOS7では、UINavigationControllerで子画面に進んだあと、子画面を左から右にスワイプすると子画面がpopされます親画面に戻ります。この機能は以下のコードで無効化できます。

if ([self.navigationController respondsToSelector:@selector(interactivePopGestureRecognizer)]) {
    self.navigationController.interactivePopGestureRecognizer.enabled = NO;
}

How to disable back swipe gesture in UINavigationController on iOS 7

Comments

comments

コメントを残す

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です