objective c - iOS animation: background continuously moving (game) -


i coding educational game in need background continuously moving. i've tried use blocks (ios 4), reason result isn't satisfying (even if specify linear animation, image slows down @ end. suggestion? help!

    soil0 = [[uiimageview alloc] initwithimage:[uiimage imagenamed:@"soil900.jpg"]]; soil0.frame = cgrectmake(0, 0, [uiscreen mainscreen].applicationframe.size.width, [uiscreen mainscreen].applicationframe.size.height);  [uiview animatewithduration:5.0                       delay:0.0                     options:uiviewanimationoptionrepeat | uiviewanimationcurvelinear                  animations:^{                      soil0.transform = cgaffinetransformmaketranslation(0, -450);  }                   completion:^(bool fin) { if (fin)                   {                        soil0.transform = cgaffinetransformmaketranslation(0, +450);                  }                  }]; 

i think perhaps seeing easing. uiviewanimationcurvelinear use setanimationcurve class method. try using uiviewanimationoptioncurvelinear instead.


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -