0

I put a regular UITableView owned by a UITableViewController under UINavigationController.

Now, look at this code:

        [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]);
        }];

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

The first set of PO is like this:

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>>

The second set of PO shows

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>>

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

Why?

Alex Zavatone
  • 4,106
  • 36
  • 54
user4951
  • 32,206
  • 53
  • 172
  • 282

1 Answers1

2

_UIParalaxDimmingView, judging from the name, has two purposes:

  1. Dim content behind the wrapped controller
  2. Add a paralax effect to the wrapped controller

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

  1. Presented view controller
  2. UIPopoverController
  3. During specific controller transitions (animations)

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

Sulthan
  • 128,090
  • 22
  • 218
  • 270