animation - Animating UIView from right to left direction, iPhone -


i working on iphone application. having memoryviewcontroller page on have display questions user particular time period. have reload same view new question again , again. here have apply view animation in form of right left move. , new view contain new question.

have take 2 different views on same parent view? or can implemented same view.

any code help, please.

thanks.

i make them in 2 different views, end like:

newquestionview.frame=cgrectmake(360.0,0.0,newquestionview.frame.size.width,newquestionview.frame.size.height);  [uiview animatewithduration:1                      animations:^{                          oldquestion.frame=cgrectmake(-360.0, 0.0, oldquestion.frame.size.width, oldquestion.frame.size.height);                          newquestionview.frame=cgrectmake(0.0, 0.0, newquestionview.frame.size.width, newquestionview.frame.size.height);                      }]; 

what happen is:

  • you first position new question in right side of screen, can see coming right. then, inside animation, put old question in x=-360 , new on in x=0, way have effect want. in animatewithduration:1, can change 1 whatever time want animation last.

Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -