I am writing this code to move image left to right, and it working fine. But, now I want to do this from right to left.
[UIView animateWithDuration:20.0
delay:0.0
options: UIViewAnimationOptionAllowUserInteraction + UIViewAnimationOptionRepeat +UIViewAni开发者_Python百科mationOptionCurveLinear
animations:^{imageView.frame = CGRectMake(x, 0, 12000, 768);
}
completion:nil];
Please help me out. Thanks.
Change the X-Coordinate of your image view frame.
Use below
[UIView animateWithDuration:20.0
delay:0.0
options: UIViewAnimationOptionAllowUserInteraction + UIViewAnimationOptionRepeat +UIViewAnimationOptionCurveLinear
animations:^{imageView.frame = CGRectMake(0, 0, 12000, 768);
}
completion:nil];
精彩评论