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

This might need to be StateObject #17

Open
aheze opened this issue Sep 16, 2021 · 4 comments
Open

This might need to be StateObject #17

aheze opened this issue Sep 16, 2021 · 4 comments

Comments

@aheze
Copy link
Owner

aheze commented Sep 16, 2021

@ObservedObject var searchBarConfigurator = SearchBarConfigurator()

@hkamran80
Copy link
Collaborator

Why?

@aheze
Copy link
Owner Author

aheze commented Sep 24, 2021

The original instance of an ObservableObject should be StateObject, I think. https://www.hackingwithswift.com/quick-start/swiftui/what-is-the-stateobject-property-wrapper

@aheze
Copy link
Owner Author

aheze commented Sep 24, 2021

However @StateObject is iOS 14+... idk if there's a way to define different properties based on iOS version. I'll look into it.

@hkamran80
Copy link
Collaborator

This Stack Overflow answer should help

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

2 participants