UIView transitions in iPad?
I have tow uiview on a button click i am doing some animation like using this code ..
// Second Uiview put it on bottom
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:1.0];
self.AcTypeView.transform=CGAffineTransformMakeTranslation(0, 493);
[UIView commitAnimations];
//First uiview put it on top
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:2.0];
self.loginView.transform=CGAffineTransformMakeTranslation(0, -700);
[UIView commitAnimations];
after that i rotate my ipad to Portrait mode to Landscape mode
but the first view getting disappear in Landscape mode i want to show firs开发者_C百科t view in Landscape mode like Portrait mode..
i don't know this is clear or no but please run this using two view and see in both the modes (Landscape and Portrait).
please help me out??? Thanks in advance!!!!!
Check your view's AutoresizingMask. Set them to UIViewAutoresizingNone to check.
I can be that the left resizing mask is set to "adjust margin" and that the consequence is that IOS so much change the margin that the view is outside the screen. You can check that by logging view's frame after the rotation.
So, when instantiating your views (on loadView method),
self.AcTypeView.autoresizingMask = UIViewAutoresizingNone;
self.loginView.autoresizingMask = UIViewAutoresizingNone;
精彩评论