I want to animate uilabel to change text every 1 second.
But when i run the app, it directly shows the last word. I.e. i have 4 different sentences to display one after another but it directly shows the last one.
This is the code that I am using
[UIView animateWithDuration:1.0
animations:^{
self.mapStat.alpha = 0.0f;
self.mapStat.text = @"Retriving Coordinates";;
self.mapStat.alpha = 1.0f;
}];
[UIView animateWithDuration:1.0
animations:^{
self.mapStat.alpha = 0.0f;
self.mapStat.text = @"Retrieved Coordinates";
self.mapStat.alpha = 1.0f;
}];
[UIView animateWithDuration:1.0
animations:^{
self.mapStat.alpha = 0.0f;
self.mapStat.text = @"Applying Coordinates";
self.mapStat.alpha = 1.0f;
}];
[UIView animateWithDuration:1.0
animations:^{
self.mapStat.alpha = 0.0f;
self.mapStat.text = @"Loading Map!";
self.mapStat.alpha = 1.0f;
}];
What is wrong with the code?
And is there any easier way to perform this animation?