Skip to content

Instantly share code, notes, and snippets.

@h4yder
Created August 12, 2020 15:13
Show Gist options
  • Save h4yder/ef0400b9dad2db46f12ae746c367d095 to your computer and use it in GitHub Desktop.
Save h4yder/ef0400b9dad2db46f12ae746c367d095 to your computer and use it in GitHub Desktop.
var body: some View {
ZStack {
Group {
RoundArrowBackground()
.fill()
.opacity(backgroundOpacity)
RoundArrow()
.stroke(lineWidth: 3)
RoundArrowHead()
.fill()
}
.rotationEffect(rotation)
// Duration label
ScalableText(string: "\(interval)")
.opacity(durationLabelOpacity)
ScalableText(string: accumulationString, fontWeight: .bold, xOffset: xOffset)
.opacity(accumulationLabelOpacity)
}
.accessibility(label: Text("Forward \(interval) seconds"))
.accessibility(addTraits: .isButton)
.accessibilityAction { self.performTap() }
.contentShape(Rectangle())
.onTapGesture { self.performTap() }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment