Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3808924
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T15:13:29+00:00 2026-05-19T15:13:29+00:00

i try to animate background in my app. I use an image view with

  • 0

i try to animate background in my app.

I use an image view with an image and on view load I started a timer that scroll image.
It’s all ok, i decrement x and the image seems to be animated.

But, when the image end (in my case 800px) i reset x to 0 and i see an ugly animation…

Is there a better way to fix this simple animation?

[...]
[NSTimer scheduledTimerWithTimeInterval:0.1 target:self selector:@selector(scrollBackground) userInfo:nil repeats:YES];
[,,,]
int x = 0;

- (void) scrollBackground { 
    if (x <= -480 ) x = 0;

    [background setFrame:CGRectMake(x--, background.frame.origin.y, background.frame.size.width, background.frame.size.height)];
}

thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T15:13:30+00:00Added an answer on May 19, 2026 at 3:13 pm

    what does “ugly animation” mean?
    if the image ends in similar way as it begins it is probably ok, at -480 the image should be the same as at x=0
    suppose to have a cilinder with a texture around it, in the point of conjunction you see the difference only if the image ends different from the begin of the same image.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

when i try to animate custom View (created in java code), there is no
I'm currently attempting to set up background audio for an app I'm developing for
Simple just trying to animate a p-tag #disclaimer to highlight the background color. Example
i try to animate a TextView on a changeText But always see only one
I have a strange problem when I try to deploy my current app to
IE is giving me an undefined NAN when i try to view the calender...
Try loading this normal .jpg file in Internet Explorer 6.0. I get an error
try { ... } catch (SQLException sqle) { String theError = (sqle).getSQLState(); ... }
I try to fetch a Wikipedia article with Python's urllib: f = urllib.urlopen(http://en.wikipedia.org/w/index.php?title=Albert_Einstein&printable=yes) s
I try to define a schema for XML documents I receive. The documents look

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.