SupportDocs icon indicating copy to clipboard operation
SupportDocs copied to clipboard

This might need to be StateObject

Open aheze opened this issue 4 years ago • 4 comments

https://github.com/aheze/SupportDocs/blob/7bbfe645de0cbb931aa71e0aca16bcc36cec75a8/Sources/SupportDocs/SupportDocsView.swift#L104

aheze avatar Sep 16 '21 03:09 aheze

Why?

hkamran80 avatar Sep 24 '21 04:09 hkamran80

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 avatar Sep 24 '21 04:09 aheze

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

aheze avatar Sep 24 '21 04:09 aheze

This Stack Overflow answer should help

hkamran80 avatar Sep 27 '21 19:09 hkamran80