OfTheWolf / TwitterProfile

Nested scrolling with pager just like in Twitter and Instagram profile.
MIT License
266 stars 45 forks source link

Scroll to top #2

Closed Xhale1 closed 4 years ago

Xhale1 commented 4 years ago

Incredible project, it's the only one I've found that properly solves the whole layered scroll view issue.

The one issue I've found is that when a user taps the status bar on the top of the screen, the entire view shifts down a bit instead of scrolling to top. Clicking twice properly scrolls to top. I'm unsure of how to fix this as I'm not as familiar with the project structure as you are.

OfTheWolf commented 4 years ago

@Xhale1 You can disable master scrollView status bar tap gesture. See below.

 class MasterViewController : UIViewController, UIScrollViewDelegate {
...
    override func loadView() {
        scrollView = UIScrollView()
        scrollView.scrollsToTop = false  //disable status bar gesture 
Xhale1 commented 4 years ago

Beautiful, it works like a charm!