Menu

How to disable page transition by gesturing

Kaarigar
2013-10-15
2013-10-17
  • Kaarigar

    Kaarigar - 2013-10-15

    I have a UIPageViewController that controls several UIViewControllers. My app transitions from a page to another page when user takes certain actions such as clicking a button. I don't want users to be able to transition to a page by touching and dragging a page with a finger. Is that possible? How can I accomplish that?

     
  • Babak Yaghoobi

    Babak Yaghoobi - 2013-10-15

    Hi Kaarigar

    Added EnableScroll method to TDPFUIPageViewController. download from [code] section.
    Now you can call this method in onFormShow Event to disable manually scrolling.

    DPFUIPageViewController1.EnableScroll( false );
    

    regards

     

    Related

    Code: code


    Last edit: Babak Yaghoobi 2013-10-15
    • Kaarigar

      Kaarigar - 2013-10-15

      Thanks! I got the latest code bu build fails at line 318 in DPF.iOS.UIPageViewController. Should EnableScroll() method be enclosed in {$IFDEF iOS} conditional?

       
  • Babak Yaghoobi

    Babak Yaghoobi - 2013-10-15

    Hi Kaarigar

    Yes, {$IFDEF iOS} needed.
    Fixed [code]

    Regards

     

    Related

    Code: code

  • Kaarigar

    Kaarigar - 2013-10-17

    It seems that this fix works only if the transition style is tsPageCurl. If the transition style is tsScroll, it is still possible to transition the pages by gesturing. Will appreciate if you have another look at it. Thanks!

     
  • Babak Yaghoobi

    Babak Yaghoobi - 2013-10-17

    Hi Kaarigar

    Thank you for feedback,

    Fixed.

    Download last source [code]

    Regards

     

    Related

    Code: code


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.