且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在两个UITableViews之间过渡时如何模仿UINavigation动画行为

更新时间:2022-11-08 14:25:03

// Set table 2 up offscreen as starting state
CGRect rect = tableView2.frame;
rect.origin.x = rect.size.width;
tableView2.frame = rect;

// fill in any details you need for the animation
[UIView beginAnimation:...

// move 1 left offscreen
rect = tableView1.frame;
rect.origin.x = -rect.size.width;
tableView1.frame = rect;

// bring 2 right onscreen
rect = tableView2.frame;
rect.origin.x = 0;
tableView2.frame = rect;

[UIView commitAnimation];