UIPageViewController
(@interface PageScrollViewController : UIPageViewController
)を継承するviewController
を取得しました。UIPageViewController
からのスクロールをどのように有効または無効にすることができますか? UIScrollView
を使用する場合、setScrollEnabled:NO
とself.view.userInteractionEnabled = NO;
は、スクロールだけでなくUIView
全体をブロックするので、オプションではありません。UIPageViewControllerのスクロールを無効/有効にする
EDIT これはPageScrollViewController : UIPageViewController
クラスである:
if ([[notification name] isEqualToString:@"NotificationDisable"]){
NSLog (@"Successfully received the disable notification!");
for (UIGestureRecognizer *recognizer in self.gestureRecognizers) {
recognizer.enabled = NO;
}
}
私はこれを試しましたが、for-loopは実行されません – Shinonuma
どこでこのループを実行しますか?いくつかのコードを見ると助けになるでしょう。 – tilo
私は質問を編集しました – Shinonuma