Scrollerview slide to the left side of the side pull back

Today when the optimization project found a need to optimize the place, is a scrollerview, there are a lot of pages, slide to the left side did not pull back, just click on the upper left corner of the back button to return, this is because the scrollerview absorption of the system side make gestures, gestures do not pass on this. The problem has always been there but I didn’t care too much, until today. First I decided to optimize the
added in viewDidLoad this sentence.

[self.scrollView.panGestureRecognizer requireGestureRecognizerToFail:self.navigationController.interactivePopGestureRecognizer];

And this sentence is scrollerview in the above side pull back, but whether the page is not the most on the left side can return, I need to be at the left side of the side can pull back, not just the left most normal sliding. Then I looked at the Book Jane personal interface found it is on the Scrollview scrollView.contentOffset.x monitor, when the scrollView.contentOffset.x is less than a certain value of the direct pop, this is not the same as I want. Silently smoking a cigarette, I suddenly thought of the following code:

* / / * * after the call slip - (void) scrollViewDidEndDecelerating: (UIScrollView * scrollView) {if (scrollView.contentOffset.x = < 0) {/ / sliding end if Scrollview is sliding left most then makes it side pull back to self.navigationController.interactivePopGestureRecognizer.enabled = YES;}else {/ / or can not side pull back to self.navigationController.interactivePopGestureRecognizer.enabled = NO;}}}

Well, the idea is that, if there is anything wrong with the hope that we can help point out, thank you