Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SwiftUI every time I click to switch, a new view will be generated. #729

Open
yiweiwoshiniya opened this issue Sep 10, 2024 · 2 comments
Open

Comments

@yiweiwoshiniya
Copy link

Every time I click to switch, a new view will be generated. How can I write to prevent the view from being destroyed
For example, I generate a new 3 from index 0 to 3, and then click on 0 to generate a new 0

The page has network requests, and every time a new page is generated, it is first blank

@yiweiwoshiniya
Copy link
Author

I removed WeakReference's weak from source code, just fine. How can i resolve this question.

@yiweiwoshiniya
Copy link
Author

@rechsteiner Can you give me a suggestion

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant