Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7571453
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T15:40:45+00:00 2026-05-30T15:40:45+00:00

I have an interesting issue involving the relationship between sibling layers in a Core

  • 0

I have an interesting issue involving the relationship between sibling layers in a Core Animation layer hierarchy. Here’s my hierarchy:

Animation layer: <CALayer: 0x7ccf060> <--- custom animation layer

Content view's sublayers: (
    "<CALayer: 0x7e7db10>", <--- map view layer
    "<CALayer: 0x7cbfe10>", <--- table view layer
    "<CALayer: 0x7ccf060>"  <--- custom animation layer
)

So I have a few layers in a layer tree, one of which is a layer I create for an animation (which contains several sublayers, all of whose content is provide from a CGImageRef).

Clearly, the animation layer is a sibling, not a child, of the table view layer. However, what’s happening is that this custom animation layer is being offset directly proportional to the contentOffset of the table view, i.e., how much I’ve scrolled. In my case, the animation layer is really an image representation of the table view.

Here’s what the table view looks like scrolled down a bit just before I insert the animation layer as a sibling:

before

And here is immediately after, when I render the table view’s layer to a CGImageRef and use that as the source contents for a regular CALayer‘s contents property:

after

Again, the layer contents is merely an image representation of the table view’s layer, so I don’t see how the contentOffset could affect this other layer at all. Perhaps if I was adding the layer as a sublayer of the table view’s layer, maybe I could see where there would be issues. But this animation layer is a sibling layer, so why would it be affecting anything?

Here is the frame of the animation layer that I’ve also logged:

Animation layer's frame: {{0, 0}, {320, 372}}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T15:40:46+00:00Added an answer on May 30, 2026 at 3:40 pm

    I’m assuming the scrollview is doing some fancy work with layering etc to optimize rendering. Meaning that since your Animation Layer’s frame is correct, it’s actually fault to the rendering of the layer, which will need to be negatively offset to the scroll views offset to compensate.

    When rendering first translate the Context negative to the scrollViews offset CGContextTranslateCTM(ctx, -contentOffset.x, -contentOffset.y); then render with [layer renderInContext:ctx];

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a rather interesting issue with SVG animation. I am animating along a
Here we have an interesting real-world algorithm requirement involving colors. N Pretty Colors :
We have found an interesting issue between ASP.NET 3.5 and ReportViewer with Google Chrome.
Here is an interesting issue I noticed when using the Except Operator: I have
I have an interesting issue with HTTPS ports not being handled properly. It is
Someone please help. I have an interesting issue. I am trying to implement an
I have found an interesting issue in windows which allows me to cause the
I have ran into an interesting issue while trying to create a more usable
I met an interesting issue about C#. I have code like below. List<Func<int>> actions
I ran across an interesting issue today. We have an application that utilizes Zend

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.