cwRichardKim / RKSwipeBetweenViewControllers

Swipe between ViewControllers like in the Spotify or Twitter app with an interactive Segmented Control in the Navigation Bar
MIT License
1.67k stars 156 forks source link

Diagonal Dragging #14

Closed kyco16 closed 9 years ago

kyco16 commented 9 years ago

I noticed when I move this view controller it drags in a multitude of directions besides up and down and I am assuming that is because of scrollview? Is there any way to stop it from moving diagonally? I am currently trying to stop the scrollview from moving in diagonal directions with every snippet of code I can find online. Could it be because I have auto layout turned on?

cwRichardKim commented 9 years ago

Hey, I'm not quite sure what you mean. Are you talking about a particular page in the controller or are you talking about the scrolling action between them?

kyco16 commented 9 years ago

I have tableview controller as both of the view controllers and when I was trying to swipe to page over I noticed that I was moving my tableview and the uipagecontroller scroll simultaneously which resulted in a diagonal moving effect. For some reason it seems to not be an issue now but that's because I went in a change a few things to stop it from moving diagonally.

cwRichardKim commented 9 years ago

That's very odd behavior (it shouldn't happen). You should only ever be able to interact with a single scroll view at once by default. Anyway, let me know if the issue comes up again

kyco16 commented 9 years ago

Okay it is coming up again and I think it might be an issue with iOS 7 devices. I have an iPhone 4 and iPhone 6 Plus that I test on and the scroll view works PERFECTLY fine on my iPhone 6 Plus running iOS 8. The problem is occurring now on only the iOS 7 iPhone 4. The tableview is moving freely and only one tableview gets loaded as well. The contentSize is way bigger than it needs to be. BUT when I scroll over once and back again by pressing the button on the top, the pageView and scrollView reset back to the way they should behave (like it works exactly as it does on the iPhone 6 Plus). I am just not sure why it happens after I swipe to the second view and back to the first.

I have 2 view controllers by the way

cwRichardKim commented 9 years ago

I'm not sure I understand the behavior of the bug just yet, but it sounds like some weirdness with UIPageViewController. The struggle of this repo is that apple makes it really difficult to actually do any any of this, and most of the code is just messing around with UIPageViewController to get it to not be stupid. I'm not sure if it'll solve your problem, but in the past I've found that it behaves best when things are loaded as asynchronously as possible. Would you mind sending me a few screenshots?