Skip to content

Instantly share code, notes, and snippets.

@adamsinger
Created September 5, 2019 21:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adamsinger/1617f67cab3679fe2c06ac227e29db2b to your computer and use it in GitHub Desktop.
Save adamsinger/1617f67cab3679fe2c06ac227e29db2b to your computer and use it in GitHub Desktop.
import SwiftUI
struct BugRepro: View {
@State var length: Double = 1.0
var body: some View {
VStack {
Spacer().frame(height: 1)
Group {
ForEach(0..<3) { i in
BugReproElement()
}
.frame(width: UIScreen.main.bounds.width * CGFloat(length))
}.offset(x: 0, y: -0.5)
Slider(value: $length, in: 0.0...1.0)
}
}
}
struct BugRepro_Previews: PreviewProvider {
static var previews: some View {
BugRepro()
}
}
struct BugReproElement: View {
var body: some View {
VStack {
Spacer().frame(height: 1)
Text("125lbs×5reps, 135lbs×3reps, 125lbs×5reps, 125lbs×10reps")
.frame(minWidth: 0, maxWidth: .infinity, alignment: .leading)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment