문제

In my iPhone app, I want that the user can slide views on swipe gesture.

I want that on swipe gesture the views should horizontally slide as if all the views are stitched together.

It should be a smooth motion of views.

What should I do?

Please Help and Suggest

Thanks.

도움이 되었습니까?

해결책

Sounds to me like you should be adding a UIScrollView as your parent view, and adding these other views as subviews of the scroll view, setting their x offsets where they need to be to have them "stiched together". You get the horizontal scrolling for free, and things work as you'd expect.

다른 팁

You can also set up a NavigationController to push and pop views to the stack. Then in your viewController you can add gestures.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top