mirror of
https://github.com/ivanvorobei/SwiftUI.git
synced 2026-04-26 18:48:43 +02:00
Add Jike
This commit is contained in:
32
Examples/Jike/SwiftUI_Jike/Cell/ZoneCell.swift
Executable file
32
Examples/Jike/SwiftUI_Jike/Cell/ZoneCell.swift
Executable file
@@ -0,0 +1,32 @@
|
||||
//
|
||||
// ZoneCell.swift
|
||||
// SwiftUI_Jike
|
||||
//
|
||||
// Created by alexyang on 2019/6/5.
|
||||
// Copyright © 2019 alexyang. All rights reserved.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct ZoneCell : View {
|
||||
var imgName:String
|
||||
var title:String
|
||||
var body: some View {
|
||||
VStack{
|
||||
Image(imgName)
|
||||
Text(title)
|
||||
.font(Font.system(size: 10))
|
||||
.color(Color.gray)
|
||||
.frame(alignment: .center)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
struct ZoneCell_Previews : PreviewProvider {
|
||||
static var previews: some View {
|
||||
ZoneCell(imgName: "pokemon", title: "苹果产品爱好者")
|
||||
}
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user