#define isPhone568 ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone && [UIScreen mainScreen].bounds.size.height == 568)
#define iPhone568ImageNamed(image) (isPhone568 ? [NSString stringWithFormat:@"%@-568h.%@", [image stringByDeletingPathExtension], [image pathExtension]] : image)
#define iPhone568Image(image) ([UIImage imageNamed:iPhone568ImageNamed(image)])
from http://stackoverflow.com/questions/12519110/what-to-name-images-for-iphone-5-screen-size
之後 iphone 5 用的圖片設定 xxx-568h@2x.xxx 即可
僅限 coding, IB 端並不適用(某些設計師請別再以為用滑鼠拉一拉就可以換所有圖了..這並不是 word..,就跟你們畫圖時用的工具不是小畫家一樣
沒有留言:
張貼留言