-
Notifications
You must be signed in to change notification settings - Fork 132
Open
Labels
enhancementNew feature or requestNew feature or request
Description
I'm trying to add something like CurrentLineView to display other information like Sunrise and Sunset, but I can't access the scroll position or something similar to calculate its position. Do you have an idea how I can do this?
Here is my code to explain what I'm trying to do:
struct CalendarContentView: View {
@ObservedObject var viewModel: CalendarViewModel = CalendarViewModel()
@State var test: String = "test"
var body: some View {
GeometryReader { geo in
CalendarDisplayView(events: $viewModel.events, geo: geo, test: $test)
.overlay {
ZStack {
Text("Sunrise 6:35 AM")
.position(x: 110, y: geo.size.height / 2 - 12)
.foregroundColor(Color.blue)
Path() { path in
path.move(to: CGPoint(x: 44, y: geo.size.height / 2 - 1))
path.addLine(to: CGPoint(x: 44, y: geo.size.height / 2))
path.addLine(to: CGPoint(x: geo.size.width, y: geo.size.height / 2))
path.addLine(to: CGPoint(x: geo.size.width, y: geo.size.height / 2 - 1))
}.fill(Color.blue)
}
}
}
}
}Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
