我希望在 "GLPaint" 示例代码中支持肖像和倒置肖像的方向。 这个应用程序支持哪些代码来实现肖像和倒置肖像的方向?
"GLPaint"示例代码 http://developer.apple.com/library/ios/#samplecode/GLPaint/Introduction/Intro.html%23//apple_ref/doc/uid/DTS40007328
这个示例使用对象窗口而不是子类化UIViewController
。
我尝试了这段代码,但没成功。
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
if ((interfaceOrientation == UIInterfaceOrientationPortrait) ||
(interfaceOrientation == UIInterfaceOrientationPortraitUpsideDown))
return YES;
return NO;
}
我试图修改应用程序以建立一个视图控制器2模式。
A:GLPaint添加子类视图控制器。 B:新项目OpenGL ES应用程序添加GLPaint。
两者都不好。 目前,我不知道源代码有什么问题。