0
我在UIWindow的底部有一個UIImageView。我希望它始終將其顯示在底部,無論方向如何,但無法實現。任何解決方案?根據UIWindow方向旋轉UIImageView?
我在UIWindow的底部有一個UIImageView。我希望它始終將其顯示在底部,無論方向如何,但無法實現。任何解決方案?根據UIWindow方向旋轉UIImageView?
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;
}
享受:-)
嘿它顯示DegreesToRadians – 2012-08-21 05:36:27
不工作的人的錯誤。 – 2012-08-21 05:39:59
查看更新的問題我已添加屏幕截圖 – 2012-08-21 05:41:15