1 min readSep 1, 2020
ForEach(0..<count, id: \.self) 的 \.self 代表 0..<count 的每個數字,ForEach(loves, id: \.self) 的 \.self 代表 loves 的每個成員,\. 的語法跟 KeyPath 有關
https://medium.com/彼得潘的-swift-ios-app-開發問題解答集/swift-方便存取-property-的-keypath-keypath-as-functions-85778939c2fd