iphone - Disable/enable scrolling in UIPageViewController -


i got viewcontroller inherits uipageviewcontroller ( @interface pagescrollviewcontroller : uipageviewcontroller ) i'm wondering how can enable , disable scrolling uipageviewcontroller? when using uiscrollview setscrollenabled:no , self.view.userinteractionenabled = no; isn't option since blocks whole uiview instead of scrolling.

edit in pagescrollviewcontroller : uipageviewcontroller class:

if ([[notification name] isequaltostring:@"notificationdisable"]){     nslog (@"successfully received disable notification!");     (uigesturerecognizer *recognizer in self.gesturerecognizers) {         recognizer.enabled = no;     } } 

try looping through gesturerecognizers of uipageviewcontroller , disable/enable them:

for (uigesturerecognizer *recognizer in pageviewcontroller.gesturerecognizers) {                 recognizer.enabled = no; } 

note: found in this post, method work uipageviewcontrollertransitionstylepagecurl. may want try this solution (although seems bit hacky).


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -