Hi I am developing one application.In that i did the animation for one view to move from left to right and right to left and changing the values for labels contained in that
when Button click UIView slide right to left and left to right.
Global Declare NSString *string = @"one";
- (void)viewDidLoad
{
[super viewDidLoad];
stringslider = @"one";
}
Action Button "click"
-(IBAction)slider:(id)sender{
if ([stringslider isEqualToString:@"one"]) {
[UIView animateWithDuration:0.2
animations:^{[sliderview setFrame:CGRectMake(205, [sliderview frame].origin.y, 116, 275)];
}
completion:nil];
stringslider = @"two";
}
else if ([stringslider isEqualToString:@"two"]) {
[UIView animateWithDuration:0.2
animations:^{[sliderview setFrame:CGRectMake(342, [sliderview frame].origin.y, 116, 275)];
}
completion:nil];
stringslider = @"one";
}
}
easy uiview animation is done.