shaps80 / SwiftUIBackports

A collection of SwiftUI backports for iOS, macOS, tvOS and watchOS
MIT License
931 stars 59 forks source link

Fix configuredView doesn’t removed from cell when reuse #15

Closed strangeliu closed 1 year ago

strangeliu commented 1 year ago

Issue #

Describe your changes

The configuredView never removed from cell so it created and add to cell many many times when scroll,

the reasons:

(lldb) po #function "$__lldb_wrapped_expr12(:)"


* Backport as a value type can not store value by `objc_setAssociatedObject`
shaps80 commented 1 year ago

I'll merge this soon and it'll go into the next release 👍

Thanks again!

shaps80 commented 1 year ago

@strangeliu can I just confirm is this issue present in the table cell implementation as well? Would be great to fix that st the same time if so.

strangeliu commented 1 year ago

@shaps80 yes, this PR fixes both tableViewCell and collectinViewCell.

shaps80 commented 1 year ago

Merged and now available in 1.6.3 @strangeliu – thanks again!