神秘的_UIParallaxDimmingView.它是什么? [英] Mysterious _UIParallaxDimmingView. What is it?

查看:164
本文介绍了神秘的_UIParallaxDimmingView.它是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 UINavigationController 下放了一个 UITableViewController 拥有的常规 UITableView.

I put a regular UITableView owned by a UITableViewController under 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 只是从互联网上下载东西并用于所有显示目的,什么都不做,等待一段时间

The code blarGetArrayTobeParsedWith simply download stuff from internet and for all display purpose, just do nothing and wait for a while

第一组PO是这样的:

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,然后改变了它的父视图.

It seems that vi, which is a UITableView, then changes its parent view.

为什么?

推荐答案

_UIParalaxDimmingView,从名字上看,有两个目的:

_UIParalaxDimmingView, judging from the name, has two purposes:

  1. 变暗包装控制器后面的内容
  2. 为包裹的控制器添加视差效果

我不确定您的视图层次结构,但我希望在以下情况下使用这种控制器:

I am not sure about your view hierachy but I would expect this kind of controller in the following situations:

  1. 呈现的视图控制器
  2. UIPopoverController
  3. 在特定的控制器转换(动画)期间

如果 blarGetArrayTobeParsedWith 从 Internet 下载数据,则动画运行时和动画结束时的视图层次结构之间可能存在差异.

If blarGetArrayTobeParsedWith downloads data from the internet, the difference could be between view hierarchy when animation is running and when animation has ended.

这篇关于神秘的_UIParallaxDimmingView.它是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆