iOS Question [SOLVED] Does SetLayoutAnimated not smoothly animate anchored views also?

Discussion in 'iOS Questions' started by Sandman, Nov 8, 2018.

  1. Sandman

    Sandman Well-Known Member Licensed User

    I've got a panel, lets call it P, that I've loaded another layout, let's call it X, into. The X layout have four small panels in it, in each corner of the layout. All of these small panels are anchored to its respective corner.

    When I do a P.SetLayoutAnimated, the panel does resize smoothly, just as one could expect. But the anchored views in X don't animate, instead they jump to their end positions right away.

    Is this how it's supposed to work? I imagined that anchored views would move smoothly together with P, but that seem to be wrong.
  2. Erel

    Erel Administrator Staff Member Licensed User

    Yes. The "logical" panel is only resized once so the internal layout is only updated once.

    You can improve the visual effect by setting the duration of the layout file to be similar to the duration passed to P.SetLayoutAnimated.
    Sandman likes this.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice