azurechen / ACTabScrollView

A fancy Menu and Pager UI extends UIScrollView with elegant, smooth and synchronized scrolling tabs.
MIT License
115 stars 35 forks source link

Disable scroll gesture setting #4

Closed Minitour closed 7 years ago

Minitour commented 8 years ago

Is it possible to disable the scroll gesture and have the tab scroll using touch-up-inside through the tabs? What I am asking is if it is possible to get rid of the gesture so the user will not scroll between views by swiping.

DaniArnaout commented 8 years ago

@Minitour Sure you can. I'll submit a PR shortly with the options to turn scrolling on tab section on/off.

Meanwhile, you can hack it by adding this property to your ACTabSCrollView.swift file.

    @IBInspectable public var tabSectionScrollEnabled: Bool = true {
      didSet {
       tabSectionScrollView.scrollEnabled = tabSectionScrollEnabled
      }
    }

This way you'll be able to set tabSectionScrollEnabled to false on your ACTabSCrollView instance and have it work like a charm.

Minitour commented 8 years ago

Thanks for the suggestion @DaniArnaout.

azurechen commented 8 years ago

Thank you @DaniArnaout ! Good suggestion! And Thank you @Minitour for your feedback!

Recently I am busy in my job, but it is exciting that somebody use my library to build great things! I will keep improve this library later and welcome any PR

Thank you very much!