Skip to content

SwiftUI hosting controllers remain parented after the PagerView is removed #1111

Description

@OskarEichler

At master 7926b28, syncParentViewController returns when reactViewController is nil, leaving the UIHostingController in its previous parent.children after removal. An actual UIKit/UIHostingController Simulator harness confirms parent.children stays nonempty after removeFromSuperview, while reattachment does move the host correctly. Proposed fix: detach from the old parent when no current parent exists; retain the host for valid reattachment and preserve existing nested-pager parent synchronization. Related #702 / legacy PR #1040 cover the former implementation, not this SwiftUI parent-retention path. This source audit is AI-assisted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions