SwiftUI 简介

2020-07-11  本文已影响0人  ShenYj

e.g.

struct Content: View {
    @State var model = Themes.listModel
    
    var body: some View {
        List(model.items, action: model.selectItem) { item in
            Image(item.image)
            VStack(alignment: .leading, spacing: 10, content: {
                Text(item.title)
                Text(item.subtitle)
                    .color(.gray)
            })
        }
    }
}
上一篇 下一篇

猜你喜欢

热点阅读