Saturday, December 21, 2013

ipad development, controls the size of the screen adaptation flip

Will, ipad development, flip screen support in all directions, how to solve the problem of screen adaptation, add this function
- (BOOL) shouldAutorotateToInterfaceOrientation: (UIInterfaceOrientation) interfaceOrientation
{
return YES;
}

Support each direction of rotation, but when the specific direction of rotation to a certain, it will call the function? I think that adjust the picture size in the corresponding function and
Position, I do not know that okay? Feeling a little cumbersome, there is no better way, thank you!
Reply:
 
- (Void) willRotateToInterfaceOrientation: (UIInterfaceOrientation) toInterfaceOrientation duration: (NSTimeInterval) duration {
if (toInterfaceOrientation == UIInterfaceOrientationPortrait | | toInterfaceOrientation == UIInterfaceOrientationPortraitUpsideDown)
⋯ ⋯

No comments:

Post a Comment