相关疑难解决方法(0)

iPhone 5图像的命名约定?

我正在开发适用于iPhone 5及更低版本的应用程序.

对于图像我正在使用此代码

CGRect mainFrame = [[UIScreen mainScreen] bounds];

int imgIndex = arc4random() % 10 + 1;

if(mainFrame.size.height > 480)
    [pBackgroundImageView setImage:[UIImage imageNamed:[NSString stringWithFormat:@"dreams 1136x640 %d.jpg",imgIndex]]];
else
    [pBackgroundImageView setImage:[UIImage imageNamed:[NSString stringWithFormat:@"dreams_960x640_%d.jpg",imgIndex]]];
Run Code Online (Sandbox Code Playgroud)

但我对此并不满意.

iphone 5图像有什么特定的命名约定吗?

在此先感谢Mano

objective-c

1
推荐指数
1
解决办法
1971
查看次数

iPhone 5的屏幕尺寸

我正在开发应用程序以在iphone4和iPhone 5上工作.我使用以下代码来获取屏幕大小

  CGRect screenBounds = [[UIScreen mainScreen] bounds];
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述

我正在使用iPhone 5模拟器,但它显示了iPhone 4的屏幕尺寸.

iphone objective-c ios

-3
推荐指数
1
解决办法
1922
查看次数

标签 统计

objective-c ×2

ios ×1

iphone ×1