Skip to content
This repository was archived by the owner on Sep 17, 2025. It is now read-only.
This repository was archived by the owner on Sep 17, 2025. It is now read-only.

Cannot update view #38

@giarchive

Description

@giarchive

In a simple view that displays the following text, even if you change the content of the text, the content of the PiP will not be updated. The same result is if you reopen PiP or assign an .id to View.

import SwiftUI
import Pipify

struct ContentView: View {
    @State var displayContent = false
    @State var isPresented = false
    
    @State var testText = "ABC"
    var body: some View {
        Button(action: {
            testText = "DEF"
        }) {
            Text("Change text")
        }
        VStack {
            Text(testText)
        }
        .background() {
            Color.white
        }
        .pipify(isPresented: $isPresented)
        .padding()
        Button(action: {
            isPresented.toggle()
        }) {
            Text("Start PiP")
        }
    }
}

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