✨TestSVGFE

⬆️ 需要:
// 2022.02.15 (*)
import SwiftUI
// ⭐️ GridItem + 🅿️ Repeatable
extension GridItem: Repeatable {}
/// test ScrollVGridForEach
struct TestSVGFE: View {
var body: some View {
// ⭐️ GridItem + 🅿️ Repeatable
let twoFlexCols = GridItem(.flexible()) * 6
// 👔 ScrollVGridForEach
ScrollVGridForEach(0..<80, columns: twoFlexCols) { i in
let codepoint = i + 0x1f600 // code point
let codepointString = String(format: "%02X", codepoint) // hex format
let emoji = String(Character(UnicodeScalar(codepoint)!)) // emoji
VStack(spacing: 12) {
Text("\(emoji)")
Text("\(codepointString)")
.font(.system(.caption, design: .monospaced))
.foregroundColor(.secondary)
}
.shadow(radius: 2)
.padding()
// 🌀ShapeStyle +LinearGradient, +.white()
.background(.vertical(.white(0.28), .white(0.2)))
.cornerRadius(4)
.compositingGroup()
.shadow(radius: 4)
}
}
}
struct TestSVGFE_Previews: PreviewProvider {
static var previews: some View {
TestSVGFE().padding()
}
}
Last updated
Was this helpful?