神秘的_UIParallaxDimmingView。它是什么?

时间:2013-12-10 14:27:00

标签: ios objective-c uitableview

我将UITableView所拥有的常规UITableViewController置于UINavigationController下。

现在,看看这段代码:

        [BGHPTools vDoForeGroundAndWait:^{
            PO(vi);
            PO([vi superview]);
            PO ([[vi superview]superview]);
            PO ([[[vi superview]superview]superview]);
        }];
        NSArray * arObjects =blarGetArrayTobeParsedWith(weakBODo);//No view object is manipulated here!!!!
        [BGHPTools vDoForeGroundAndWait:^{
            PO(vi);
            PO([vi superview]);
            PO ([[vi superview]superview]);
            PO ([[[vi superview]superview]superview]);
        }];

代码blarGetArrayTobeParsedWith只是从互联网上下载内容并用于所有显示目的,只是什么都不做,等待一段时间

第一套采购订单是这样的:

2013-12-10 21:14:43.257 [8620:9407] vi: <BGTableViewWithBackgroundAndTopAndBottom: 0xd36d600; baseClass = UITableView; frame = (0 0; 320 480); clipsToBounds = YES; autoresize = W+H; gestureRecognizers = <NSArray: 0x15d64320>; layer = <CALayer: 0x15d64890>; contentOffset: {0, -64}>
2013-12-10 21:14:43.259 [8620:9407] [vi superview]: <_UIParallaxDimmingView: 0x15f48a40; frame = (0 0; 320 480); opaque = NO; layer = <CALayer: 0x15f79d00>>
2013-12-10 21:14:43.259 [8620:9407] [[vi superview]superview]: <UIView: 0x15850530; frame = (0 0; 320 480); layer = <: 0x15860480>>
2013-12-10 21:14:43.261 [8620:9407] [[[vi superview]superview]superview]: <UIViewControllerWrapperView: 0xcb35660; frame = (0 0; 320 480); autoresize = W+H; userInteractionEnabled = NO; layer = <CALayer: 0xcb392f0>>

第二组PO显示

2013-12-10 21:22:26.145 [8620:9407] vi: <BGTableViewWithBackgroundAndTopAndBottom: 0xd36d600; baseClass = UITableView; frame = (0 0; 320 480); clipsToBounds = YES; autoresize = W+H; gestureRecognizers = <NSArray: 0x15d64320>; layer = <CALayer: 0x15d64890>; contentOffset: {0, -64}>
2013-12-10 21:22:26.145 [8620:9407] [vi superview]: <UIViewControllerWrapperView: 0xcb35660; frame = (0 0; 320 480); autoresize = W+H; layer = <CALayer: 0xcb392f0>>
2013-12-10 21:22:26.146 [8620:9407] [[vi superview]superview]: <UINavigationTransitionView: 0x11cac940; frame = (0 0; 320 480); clipsToBounds = YES; autoresize = W+H; layer = <CALayer: 0x11cad190>>
2013-12-10 21:22:26.146 [8620:9407] [[[vi superview]superview]superview]: <UILayoutContainerView: 0x11ca8ef0; frame = (0 0; 320 480); autoresize = W+H; gestureRecognizers = <NSArray: 0x11cb1070>; layer = <CALayer: 0x11ca69e0>>

似乎vi,即UITableView,然后更改其父视图。

为什么?

1 个答案:

答案 0 :(得分:2)

从名称来看,

_UIParalaxDimmingView有两个目的:

  1. 包装控制器后面的暗淡内容
  2. 为包裹的控制器添加一个减法效果
  3. 我不确定你的观点层次结构,但在以下情况下我会期待这种控制器:

    1. 呈现视图控制器
    2. UIPopoverController
    3. 在特定控制器转换(动画)期间
    4. 如果blarGetArrayTobeParsedWith从互联网下载数据,则差异可能是在动画运行时和动画结束时的视图层次结构之间。