diff --git a/src/DemoTransition.m b/src/DemoTransition.m index d3f7f81..4c9fe3b 100644 --- a/src/DemoTransition.m +++ b/src/DemoTransition.m @@ -152,4 +152,11 @@ - (BOOL)drawTransitionFrameWithTextureFrom:(GLuint)textureFromView return !allAreGone; } +#if 0 +- (void)transitionEnded +{ + NSLog(@"transitionEnded"); +} +#endif + @end diff --git a/src/EPGLTransitionView.h b/src/EPGLTransitionView.h index 07b3f8f..99715c6 100644 --- a/src/EPGLTransitionView.h +++ b/src/EPGLTransitionView.h @@ -38,6 +38,9 @@ // return NO to end transition - (BOOL)drawTransitionFrameWithTextureFrom:(GLuint)textureFromView textureTo:(GLuint)textureToView; + +@optional +- (void)transitionEnded; @end @interface EPGLTransitionView : UIView diff --git a/src/EPGLTransitionView.m b/src/EPGLTransitionView.m index 00a7491..8679da5 100644 --- a/src/EPGLTransitionView.m +++ b/src/EPGLTransitionView.m @@ -299,6 +299,9 @@ - (void) drawView:(id)sender { if ([self render] == NO) { [self stopTransition]; + if (delegate && + [delegate respondsToSelector:@selector(transitionEnded)]) + [delegate transitionEnded]; [self removeFromSuperview]; } }