Reputation: 532
I have got a really weird problem and can't find any help on this issue.
My application is running totally fine, but sometimes the UI has a really strange behaviour: When I switch a view the next view will always slide in from the top left corner, which is really ugly. This happens btw. with every subview. No matter if it's an UITableView, it's content or even a UILabel and typed letters in a text box. I also can not reproduce this issue. I even don't know, which code i should post. It happens in the simulator and on the device.
Has anybody had the same problem or can help me to get rid of this?
Upvotes: 0
Views: 71
Reputation: 1806
Are you using any animations?
When you perform an animation and don't close it then all UI elements will be animated.
If you use the animation method mentioned below you should not forget to add
[UIView commitAnimations]
else all UI elements will be animated
I.e:
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationBeginsFromCurrentState:YES];
[UIView setAnimationCurve:UIViewAnimationCurveLinear];
[UIView setAnimationDuration: 0.5];
MyView.frame = CGRectMake(0,0,200,200);
[UIView commitAnimations];
Upvotes: 1