隨手百度到的蘋果 機型的分辨率
iPhone4:960×640 iPhone4S:960×640 iPhone5:1136×640 iPhone5S:1136×640 iPad:1024×768 iPad2:1024×768 iPad3:2048×1536 iPad4:2048×1536 iPad mini:1024×768
原始尺寸 設計 1336*768原圖 大小 2732*1536
圖像兩邊 自動裁剪。場景中的元素位置 換算公式
scalenum=(float)g_height/(float)1536;
pyl = (float)(2732*scalenum-g_width)/2;
m_animation->setPosition( (2732*scalenum)*1000/1334-pyl, g_height*188/768 );
一套資源適配所有機型
如果直接用
cocosstudio 出來的csb文件讀取UI設計,感覺會更爽。