I am trying to move an image as it changes .image direction along with movement (timer going on, selector is change of image.png direction). The thing is my code used to work until I changed the supporting files, I changed the .png images for new ones without background. I updated the new directions in the code:

        FirstImage.image = [UIImage imageNamed:@"NewImage1.png"];

//in the next timer selector run, it changes .image

        FirstImage.image = [UIImage imageNamed:@"NewImage2.png"];

//and then it goes back to the first one in the next timer selector run

When I run the code without the change of .image, the rest of the program works just fine. That means Images move up and down the screen as they are meant to. But when I run the code with the .image changes, it freezes for a moment, it does change .image but returns the UIImage to its original position in the storyboard.

Hope someone can help.

0

There are 0 best solutions below