Adam Bell :catPOWER: on Nostr: If any SwiftUI folks wanna take a look at FB13797235 :))) Basically using @State ...
If any SwiftUI folks wanna take a look at FB13797235 :)))
Basically using @State within a UIHostingConfiguration's view created from `makeContentView` is preserved across re-configuring the view's `configuration` resulting in state data.
In my case I have my own custom cell reuse implemented for coverflow in Albums (no collectionview) and this results in albums having the wrong artwork requiring me to instead constantly call `makeContentView` to get new views with the correct state :(
Published at
2024-05-14 03:51:07Event JSON
{
"id": "8b5d78e80f95c6fe3bfbffff72cb667e07caa0d21185c8fcdf96162f4090c993",
"pubkey": "aed0b8708bc48239d5e53b5668999ad92e7aa1f31996e58cbceaf2c11e6970bd",
"created_at": 1715658667,
"kind": 1,
"tags": [
[
"proxy",
"https://mastodon.social/users/b3ll/statuses/112437406462418927",
"activitypub"
]
],
"content": "If any SwiftUI folks wanna take a look at FB13797235 :))) \n\nBasically using @State within a UIHostingConfiguration's view created from `makeContentView` is preserved across re-configuring the view's `configuration` resulting in state data.\n\nIn my case I have my own custom cell reuse implemented for coverflow in Albums (no collectionview) and this results in albums having the wrong artwork requiring me to instead constantly call `makeContentView` to get new views with the correct state :(",
"sig": "23ff31d8c731c5b842d01eee3efebde7fb0ad2bc7e63f79af2de9ed2910b5a68ab6d2a69de03cde5be83caf5f76344d14600a6ee25ecc1e070a6910cf99d4663"
}