EPGLTransitionView

| 你们大多数人应该知道github存储库中用于翻页存储的超酷EPGLTransitionView: https://github.com/epatel/EPGLTransitionView 它是在opengl中完成的,但只能在一个横向上使用。 任何人都知道或可以给我一个提示,我如何轻松实现其余的迷失取向? 谢谢,     
已邀请:
        
EPGLTransitionView
使用
FlipTransitions
制作动画。这里的方向是硬编码的,您需要将其更改为当前的方向设备。 覆盖
FlipForward
FlipBackward
类的
setupTransition
方法:
- (void)setupTransition {
NSUInteger rotationFactor = 0;
UIInterfaceOrientation orientation = [[UIApplication sharedApplication] statusBarOrientation];
switch (orientation) {
    case UIInterfaceOrientationPortrait:
        rotationFactor = 0;
        break;
    case UIInterfaceOrientationLandscapeRight:
        rotationFactor = 90;
        break;
    case UIInterfaceOrientationPortraitUpsideDown:
        rotationFactor = 180;
        break;
    case UIInterfaceOrientationLandscapeLeft:
        rotationFactor = 270;
        break;
    default:
        break;
}
// Setup matrices
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glRotatef(rotationFactor, 0, 0, -1);
glFrustumf(-0.1, 0.1, -0.1333, 0.1333, 0.4, 100.0);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();    
glEnable(GL_CULL_FACE);
f = 0;}
    

要回复问题请先登录注册