So I'm creating an iPad app that displays images in a UITableView and when when a row/image is selected it pushes another view controller that plays a video in full screen. 这一切正常,但我想动画从表格中图像的原始大小到全屏视频的过渡。此处的此视频在http://www.apple.com/ipad/videos/#itunes中以大约 1 秒的时间显示了我想要的内容。那么我将如何获得所选单元格的框架?以及如何将视图从单元格框架转换为全屏?
这是我现在进行过渡的方式:
- (void) tableView: (UITableView *) tableView didSelectRowAtIndexPath: (NSIndexPath *) indexPath
{
if (indexPath.row == 0)
{
VideoViewController * video1 = [[VideoViewController alloc] init];
UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:video1];
navController.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
navController.modalPresentationStyle = UIModalPresentationFullScreen;
navController.navigationBarHidden = YES;
[self presentModalViewController:navController animated:YES];
}
}