Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我得到一个包含对象的数组,并用它们填充集合视图。例如,我的集合视图中有 3 个对象。有没有办法根据对象名称接收当前索引路径?
谢谢
let indexPath = objects.index(where: { $0.name == "value" }).flatMap({ IndexPath(row: $0, section: 0) })