【发布时间】:2011-04-25 07:55:34
【问题描述】:
我想在示例代码“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 添加子类 View Controller。 B:New Project OpenGL ES Application 添加 GLPaint。
两者都很糟糕。 目前,我不知道源代码有什么问题。
【问题讨论】: