Macos cocoa:如何实现表格动画?
我很好奇如何实现以下应用程序动画: 单击Alcides后,应用程序将逐渐在右侧显示一个新视图,左侧表格宽度将为原始宽度的1/2。Macos cocoa:如何实现表格动画?,macos,cocoa,Macos,Cocoa,我很好奇如何实现以下应用程序动画: 单击Alcides后,应用程序将逐渐在右侧显示一个新视图,左侧表格宽度将为原始宽度的1/2。 如果我想实现它,我该怎么做?我应该使用什么样的数据结构和动画?大多数自定义动画的答案是思考你想做什么,然后去做。陈腐但真实 以动画速度X将tableview的宽度减半 以动画速度X从右侧向内移动右侧细节表 您需要将场景的ViewController作为一对表的容器。但是tableview可能有它们自己的视图控制器,容器管理员应该对这些控制器保持强烈的引用 Manag
如果我想实现它,我该怎么做?我应该使用什么样的数据结构和动画?大多数自定义动画的答案是思考你想做什么,然后去做。陈腐但真实
ManagerViewController -> UIView -> PeopleTableView -> PeopleTableViewController
-> DetailTableView -> DetailTableViewController
所以在代码中
detailTableView.frame = Frame_with_x_aligned_to_RH_edge_of_screen;
[UIView animateWithDuration:X
animations:^{
peopleTableView.frame = Frame_with_half_its_fully_expanded_width;
detailTableView.frame = Frame_with_x_aligned_to_edge_of_peopleTable;
}
completion:^{ //stuff to do at the end of the animation
}];