UIWindow の下側に UIImageView があります。向きが何であれ、常に下側に表示したいのですが、実装に問題があります。これに対する解決策はありますか?
質問する
183 次
1 に答える
0
NSLog(@"rotate");
if (UIDeviceOrientationIsLandscape([UIDevice currentDevice].orientation)){
AppDelegate *delegate = (AppDelegate *)[UIApplication sharedApplication].delegate;
// Rotate 90 degrees to hide it off screen
CGAffineTransform rotationTransform = CGAffineTransformIdentity;
rotationTransform = CGAffineTransformRotate(rotationTransform,DegreesToRadians(0));
delegate.imgV.transform = rotationTransform;
}
else if (UIDeviceOrientationIsPortrait([UIDevice currentDevice].orientation)){
AppDelegate *delegate = (AppDelegate *)[UIApplication sharedApplication].delegate;
// Rotate 90 degrees to hide it off screen
CGAffineTransform rotationTransform = CGAffineTransformIdentity;
rotationTransform = CGAffineTransformRotate(rotationTransform,DegreesToRadians(90));
delegate.imgV.transform = rotationTransform;
}
楽しみ :-)
于 2012-08-20T12:36:23.457 に答える