我使用的是ViewController containment,我的目标是iOS5和更高版本。我有一个容器viewController (A),它包含一个侧边栏(B)和一个内容区(C)。我希望当用户点击侧边栏(B)上的一个按钮时,一个tableViewController (D)将从侧边栏(B)的下方滑出,滑到内容区域(C)的上方。
实现这一目标的最佳方式是什么?
我刚刚开始理解基本的viewController容器(一个包含两个viewControllers的父viewController ),但是从子viewController下面滑出一个额外的viewController已经被难住了。

发布于 2012-07-20 06:13:01
您将希望采用两种方法中的一种。
- Allocate, initialize, and style your table view.
- Add it as a subview of its parent view controller. Make sure its frame is underneath view controller B.
- Use [viewcontrollerA bringSubviewToFront:viewcontrollerB];
- Finally, use [UIView animateSubviews] to slide view controller D to where it should be.
关闭VCD时,请使用与在中相同的方式对其进行动画处理。
希望这能有所帮助!
https://stackoverflow.com/questions/11568052
复制相似问题