0

I want to add two swipe gesture. I did the code, and it's running, my text in the viewcontroller change when i touch the screen.

BUT, i want to add a "effect" when the user wants to slide at the next (or the previous) news, because currently, i'm just changing the text.

i tried to add action in the storyboard, to add push on the swipe with the view.

It's running, but there are two problems :

  • The push, seems to have a problem, because, when i want to slide on the previous news, the push effect comes right to left. (and not left - right)
  • I can't only change the contents without touch the navigation bar ? (because when i slide, the navigation bar loose him title, etc..)
Apurv
  • 17,116
  • 8
  • 51
  • 67
deveLost
  • 1,151
  • 2
  • 20
  • 47

2 Answers2

0

If I understood you correctly you might want to use a UIScrollView. This will give you a nice animation. You need a UIScrollView and add two of your ViewControllers as subviews.

Here are links to some ScollView tutorials: Are there any good UIScrollView Tutorials on the net?

Community
  • 1
  • 1
  • Absolutely not x) I want to be able to slide. For example, i have a news, and i want when i "slide" to right, an other news comes. – deveLost Feb 17 '14 at 14:33
0

Pushing on the navigation controller stack is to the right if you want to go back to opposite direction instead of pushing, you should pop like so: [self.navigationController popViewControllerAnimated:YES]; You could paste some code in your question :)

stellz
  • 130
  • 1
  • 8
  • Sorry, i made an other post here : http://stackoverflow.com/questions/21910409/add-effect-like-push-on-swipegesture?noredirect=1#comment33186209_21910409 i absolutely forgot this x) – deveLost Feb 20 '14 at 15:43