Skip to content

Commit

Permalink
Added a "transitionEnded" method for the delegate
Browse files Browse the repository at this point in the history
  • Loading branch information
Edward Patel authored and Edward Patel committed Mar 5, 2010
1 parent d7e7229 commit 76343e0
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/DemoTransition.m
Expand Up @@ -152,4 +152,11 @@ - (BOOL)drawTransitionFrameWithTextureFrom:(GLuint)textureFromView
return !allAreGone; return !allAreGone;
} }


#if 0
- (void)transitionEnded
{
NSLog(@"transitionEnded");
}
#endif

@end @end
3 changes: 3 additions & 0 deletions src/EPGLTransitionView.h
Expand Up @@ -38,6 +38,9 @@
// return NO to end transition // return NO to end transition
- (BOOL)drawTransitionFrameWithTextureFrom:(GLuint)textureFromView - (BOOL)drawTransitionFrameWithTextureFrom:(GLuint)textureFromView
textureTo:(GLuint)textureToView; textureTo:(GLuint)textureToView;

@optional
- (void)transitionEnded;
@end @end


@interface EPGLTransitionView : UIView @interface EPGLTransitionView : UIView
Expand Down
3 changes: 3 additions & 0 deletions src/EPGLTransitionView.m
Expand Up @@ -299,6 +299,9 @@ - (void) drawView:(id)sender
{ {
if ([self render] == NO) { if ([self render] == NO) {
[self stopTransition]; [self stopTransition];
if (delegate &&
[delegate respondsToSelector:@selector(transitionEnded)])
[delegate transitionEnded];
[self removeFromSuperview]; [self removeFromSuperview];
} }
} }
Expand Down

0 comments on commit 76343e0

Please sign in to comment.