- //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);
- }
- //该片段来自于http://www.codesnippet.cn/detail/080120131424.html
来源: http://www.codesnippet.cn/detail/080120131424.html