您的位置:首页 > 移动开发 > Cocos引擎

Porting Over iPad game to iphone the easy way cocos2d

2013-01-25 15:39 351 查看
//Add this code after "make the OpenGLView a child of the view controller" in the AppDelegate.m
//This will shrink the content of the ipad to fit on the iphone smoothly.
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
//0.9375/2 = 0.46875 * 1024 = 480
glView.layer.transform=CATransform3DMakeScale(0.9375/2, 0.9375/2, 1);
glView.layer.transform=CATransform3DTranslate(glView.layer.transform, -580, -480+37, 0);
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: