次のコードでは、iphone と ipad の向きに応じて異なる UIIMageView 位置を設定する必要があります。
// Animated images - centered on screen
animatedImages = [[UIImageView alloc] initWithFrame:CGRectMake(
(SCREEN_WIDTH / 2) - (IMAGE_WIDTH / 2),
(SCREEN_HEIGHT / 2) - (IMAGE_HEIGHT / 2) + STATUS_BAR_HEIGHT,
IMAGE_WIDTH, IMAGE_HEIGHT)];
CGRect は、iPad の縦向き、iPhone の縦向き、iPad の横向き、iPhone の横向きで異なります。
どうすればいいですか
if (Ipad Portrait orientation)
{
code with different position using CGRectMake (...............)
}
if (Iphone Portrait orientation)
{
code with different position using CGRectMake (...............)
}
if (Ipad Landscape orientation)
{
code with different position using CGRectMake (...............)
}
if (Iphone Landscape orientation)
{
code with different position using CGRectMake (...............)
}