質問

I have a UIPageViewController which manages UINavigationControllers, which are hooked up to a UITableView. I want the user to be able to swipe between the different "table views", which currently works. When the user swipes on the first or last page, the controller moves off the screen and there is black behind it. I don't want the user to be able to swipe off the screen.

I tried using gesture recognizers to prevent pan and swipe gestures in a certain direction when the user was at the first or last page but when I returned NO in gestureRecognizer:shouldReceiveTouch: the view was still able to scroll.

In the end I am trying to emulate how "snapchat" works, I don't mind using a different method to achieve what they have I just am unsure how I would do it.

役に立ちましたか?

解決 2

I finally figured out an easy semi-fix. I decided to take a screenshot and use the clone tool to get rid of all the labels and I set it as the background image of the UIPageView. Now at least it doesn't look black, it just looks like the tableview continues off the screen.

他のヒント

You can try setting background color on the superview to white or the color of your tableview.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top