小编hbr*_*df2的帖子

可扩展列表:更改箭头颜色?

遵循https://www.hackingwithswift.com/quick-start/swiftui/how-to-create-expanding-lists中的代码示例

struct Bookmark: Identifiable {
    let id = UUID()
    let name: String
    let icon: String
    var items: [Bookmark]?

    // some example websites
    static let apple = Bookmark(name: "Apple", icon: "1.circle")
    static let bbc = Bookmark(name: "BBC", icon: "square.and.pencil")
    static let swift = Bookmark(name: "Swift", icon: "bolt.fill")
    static let twitter = Bookmark(name: "Twitter", icon: "mic")

    // some example groups
    static let example1 = Bookmark(name: "Favorites", icon: "star", items: [Bookmark.apple, Bookmark.bbc, Bookmark.swift, Bookmark.twitter])
    static let example2 = Bookmark(name: "Recent", icon: "timer", …
Run Code Online (Sandbox Code Playgroud)

swift swiftui

0
推荐指数
1
解决办法
753
查看次数

标签 统计

swift ×1

swiftui ×1