//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);
}
Porting Over iPad game to iphone the easy way cocos2d
最新推荐文章于 2024-01-18 22:36:05 发布