小编Har*_*aru的帖子

如何在 SwiftUI 的列表中设置和使用参数“选择”

我已经了解了 SwiftUI,但在理解 SwiftUI 中的 List 时遇到困难。

列表定义如下。

@available(iOS 13.0, OSX 10.15, tvOS 13.0, watchOS 6.0, *)
public struct List<SelectionValue, Content> : View where SelectionValue : Hashable, Content : View {

    /// Creates a List that supports multiple selection.
    ///
    /// - Parameter selection: A binding to a set that identifies the selected
    ///   rows.
    ///
    /// - See Also: `View.selectionValue` which gives an identifier to the rows.
    ///
    /// - Note: On iOS and tvOS, you must explicitly put the …
Run Code Online (Sandbox Code Playgroud)

list ios swift swift5 swiftui

3
推荐指数
1
解决办法
2351
查看次数

标签 统计

ios ×1

list ×1

swift ×1

swift5 ×1

swiftui ×1