id(_:)

ๅฎš็พฉ

func id<ID: Hashable>(_ id: ID) -> some View

้‡่ฆ่ง€ๅฟต

we use id() to tell SwiftUI that a view is NO LONGER the same view it was. ๐Ÿ‘‰ The SwiftUI Lab

ๅƒ่€ƒ่ณ‡ๆ–™

  • SwiftUI โŸฉ View โŸฉ .id(_:)

Last updated