Skip to content

Instantly share code, notes, and snippets.

@1998code
Created July 27, 2024 10:48
Show Gist options
  • Save 1998code/7136bb231031e783ae72814ebabe1cb8 to your computer and use it in GitHub Desktop.
Save 1998code/7136bb231031e783ae72814ebabe1cb8 to your computer and use it in GitHub Desktop.
Olympic Games 2024
//
// ContentView.swift
// olympics
//
// Created by Ming on 27/7/2024.
//
import SwiftUI
struct ContentView: View {
var body: some View {
VStack {
VStack {
HStack(spacing: 15) {
Circle().stroke(Color.blue, lineWidth: 10).frame(width: 100, height: 100)
Circle().stroke(Color.black, lineWidth: 10).frame(width: 100, height: 100)
Circle().stroke(Color.red, lineWidth: 10).frame(width: 100, height: 100)
}
HStack(spacing: 15) {
Circle().stroke(Color.yellow, lineWidth: 10).frame(width: 100, height: 100)
Circle().stroke(Color.green, lineWidth: 10).frame(width: 100, height: 100)
}
.offset(y: -50)
}
VStack {
Text("🇫🇷")
Text("Paris 2024")
.bold()
.foregroundColor(.clear)
.background(
LinearGradient(gradient: Gradient(colors: [Color.blue, Color.gray, Color.red]), startPoint: .leading, endPoint: .trailing)
.mask(Text("Paris 2024").bold())
)
}.font(.largeTitle)
}
.padding()
}
}
#Preview {
ContentView()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment