简体   繁体   English

半屏向下钻取UITableView

[英]Half screen drill down UITableView

Is it possible to implement a drill down UITableView which occupies half of an iPhone vertical screen? 是否可以实现占用iPhone垂直屏幕一半的向下钻取的UITableView?

I am planning to use a UINavigationController since it seems to be the standard way of implementing a drill down. 我打算使用UINavigationController因为它似乎是实现向下钻取的标准方法。 But a UINavigationController takes a RootViewController which usually controls a full screen. 但是, UINavigationController使用RootViewController ,该RootViewController通常控制全屏。

Also if a drill down can be done on an half screen table, which is the best way of doing it ? 另外,如果可以在半屏屏幕上进行向下钻取,那是最好的方法?

One option is to use a UITableView and then swap it's view out when a row is selected. 一种选择是使用UITableView,然后在选择一行时将其换出。

See: 看到:

transitionFromView:toView:duration:options:completion: Creates a transition animation between the specified views using the given parameters. transitionFromView:toView:duration:options:completion:使用给定参数在指定视图之间创建过渡动画。

+ (void)transitionFromView:(UIView *)fromView toView:(UIView *)toView duration:     (NSTimeInterval)duration options:(UIViewAnimationOptions)options completion:(void (^)(BOOL finished))completion

http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIView_Class/UIView/UIView.html#//apple_ref/occ/clm/UIView/transitionFromView:toView:duration:options:completion http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIView_Class/UIView/UIView.html#//apple_ref/occ/clm/UIView/transitionFromView:toView:duration:options:completion

You'll have to either use a swipe gesture or button on that swapped view to swap back to the tableview. 您必须在该交换视图上使用滑动手势或按钮来交换回到表格视图。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM