Strange problem - reveal sees views that are not on sim or device

Ken Anderson's Avatar

Ken Anderson

15 Mar, 2018 04:39 PM

I have a strange problem where I've created a segue from a table view to a view (show) inside a navigation controller. In the simulator or on a device, when I click on the cell, it properly shows the detail view. The background color and header are right (set by the view controller), but the views placed on the view of the controller are not visible.

Crazy thing? They're there on Reveal! So, how do I solve a problem that Reveal doesn't seem to think I have?

Happy for any thoughts!

  1. 1 Posted by Ken Anderson on 16 Mar, 2018 10:46 AM

    Ken Anderson's Avatar

    OK, turns out this was a bug I had for years, but has only manifested itself poorly in iOS 11. My view has a background layer for a gradient, and I was adding it like this:

    [self.view.layer insertSublayer:gradient above:0];

    instead of this:

    [self.view.layer insertSublayer:gradient atIndex:0];

    The simulator/device didn't know how to render it apparently, and for some reason, Reveal is able to.

  2. Support Staff 2 Posted by Vlas Voloshin on 18 Mar, 2018 12:08 PM

    Vlas Voloshin's Avatar

    Hi Ken,

    I'm glad you've been able to resolve this issue yourself! I'm definitely curious why this issue has only manifested for you on iOS 11 – insertSublayer:above: method takes CALayer as the second parameter, so 0 was implicitly cast to nil, which I believe is treated as "above all". Reveal, however, indeed has a problem with incorrect ordering of layers interposed or inserted into the view's layer hierarchy above layers that correspond to that view's subviews. This is because Reveal doesn't yet support inspecting the layer hierarchy independently from the view hierarchy, unfortunately, but it's something we've had on our list for a long time. I'll add your report to this list, thanks!

    Best regards,

  3. Vlas Voloshin closed this discussion on 18 Mar, 2018 12:08 PM.

  4. Ken Anderson re-opened this discussion on 18 Mar, 2018 07:20 PM

  5. 3 Posted by Ken Anderson on 18 Mar, 2018 07:20 PM

    Ken Anderson's Avatar

    This bug has been there for a long time - no idea why it used to work!

  6. Tony Arnold closed this discussion on 20 Mar, 2018 10:25 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac