I am having issues with sliding a view in and out of the screen using CATransitions. I have no problem getting the view (it's like a bookmark) to slide onto the screen from the top. The problem I'm having is once the view is on the screen getting it to transition off of the screen.
This is the code I'm using to perform the slide on. The method getAnimationForDirection:type:duration: is just a helper method that returns a populated CATransition object. BookmarkView contains a single UIImageView and is a retained property on the view controller.
- (void)showBookmark
{
bookmark = [[BookmarkView alloc] initWithFrame:CGRectMake(25, 0, 80, 250)];
[swipeView addSubview:bookmark];
CATransition *animation = [self getAnimationForDirection:kCATransitionFromBottom type:kCATransitionMoveIn duration:1.0];
[[bookmark layer] addAnimation:animation forKey:@”BookmarkTransition”];
}