Skip to content

Any subclass of UIScrollView causes the animation to jump location... #2

@nishal

Description

@nishal

Any subclass of UIScrollView causes the animation to jump to a location that seems to be co-related to the contentOffset of the currently shown view.

I found a very quick fix to this:

UIView *superView = current.view.superview;
CATransformLayer *transformLayer = [[CATransformLayer alloc] init];
// The line causing the issue - transformLayer.frame = current.view.layer.bounds;
// Change this to the following:
transformLayer.frame = current.view.layer.frame;

[current.view removeFromSuperview];
[transformLayer addSublayer:current.view.layer];

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions