iOS flip tableview and UIView
So what I want to do is, I want to flip a tableview and reveal a normal UIView under it, and vis开发者_如何转开发e versa. How can I achieve this? Thanks!
If you want to control the UITableView and the UIView on the back with the same UIViewController (sounds like this might be your case given that your tableview doesn't fill the entire screen), you can simply do a view transition between the two views using transitionFromView:toView:duration:options:completion: in UIView.
The fromView is your tableview, which should already be part of the view hierarchy. The toView is your UIView to be displayed on the back of the tableview. It should be detached from the view hierarchy (no superview) before calling transitionFromView.
I'd recommend starting with the default Utility View application and then adding a UITableViewController to the main view.
If you already have a project, then create a new UIViewController for the back and present it modally. For the transition, set the modalPresentationStyle
of your backside view to UIModalTransitionStyleFlipHorizontal
.
精彩评论