Quantcast
Channel: matsuhouse » Tips
Viewing all articles
Browse latest Browse all 10

3.5インチと4インチの切り分け

$
0
0

iPhone5対応中ですが、画面サイズの問題はやっぱりあります

そこで3.5インチの時と4インチの時で画像を変える様にしてみます


CGSize result = [[UIScreen mainScreen] bounds].size;

CGFloat scale = [UIScreen mainScreen].scale;

result = CGSizeMake(result.width * scale, result.height * scale);

if (result.height == 1136) {

imageBack.image=[UIImage imageNamed:@"bg_rockerroom1136.png"];

} else {

imageBack.image=[UIImage imageNamed:@"bg_rockerroom.png"];

}

こんな感じで画面サイズで見ておけばiPhone5でも5Sでも来い!って感じですね


Viewing all articles
Browse latest Browse all 10

Latest Images

Trending Articles





Latest Images