#pragma mark - Flip screen
- (void)flipAction:(id)sender
{
[UIView setAnimationDelegate:self];
[UIView setAnimationDidStopSelector:@selector
(animationDidStop:animationIDfinished:finished:context:)];
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:0.75];
[UIView setAnimationTransition:([self.tableView superview] ? UIViewAnimationTransitionFlipFromLeft UIViewAnimationTransitionFlipFromRight)
forView:self.tableView cache:YES];
if ([instructionsView superview])
[instructionsView removeFromSuperview];
else
[self.tableView addSubview:instructionsView];
[UIView commitAnimations];
// adjust our done/info buttons accordingly
if ([instructionsView superview] == self.tableView)
self.navigationItem.rightBarButtonItem = doneButton;
else
self.navigationItem.rightBarButtonItem = flipButton;
}
댓글 없음:
댓글 쓰기