We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ScrollView(.horizontal, showsIndicators: false) { ScrollViewReader { proxy in LazyHStack(spacing: 0) { ForEach(0...timeLine.allDay(), id:.self) { dateItem in VStack(spacing:0) { SK_Day(skDate: SKDate( date: timeLine.getDateAtIndex(index: dateItem), skManager: timeLine.skManager, isDisabled: !timeLine.isEnabled(date: timeLine.getDateAtIndex(index: dateItem)), isToday: timeLine.isToday(date: timeLine.getDateAtIndex(index: dateItem)), isSelected: timeLine.isSpecialDate(date: timeLine.getDateAtIndex(index: dateItem)), isBetweenStartAndEnd: timeLine.isBetweenStartAndEnd(date: timeLine.getDateAtIndex(index: dateItem))), cellWidth: 24)
ZStack(alignment: .top) { SubDayTaskRow() SubTimeLineObject(selectedNum: $selectedNum, date: dateItem) .onTapGesture(perform: { timeLine.hiddenNeedleMaxTime = 3 self.selectedNum = dateItem timeLine.wakeUp = timeLine.getDateAtIndex(index: dateItem) }) } .background(Color.p_c) .border(width: 0.5, edges: [.top, .trailing], color: .s_c.opacity(colorScheme == .dark ? 0.5 : 1)) } .id(dateItem) .frame(width: timeLine.rowFixedWidth) .zIndex(self.selectedNum == dateItem ? timeLine.selectedIndex : 0) .onChange(of: timeLine.wakeUp, perform: { value in withAnimation(Animation.easeInOut){ proxy.scrollTo(timeLine.toThisDay(), anchor: .center) } }) } } } .background(Color.p_c) } .scrollOffsetX(self.$offsetX) .onChange(of: self.offsetX, perform: { _ in offsetToHere.set(self.offsetX, forKey: "userData2") }) .onAppear(perform: { guard let loaded = offsetToHere.object(forKey: "userData2") as? CGFloat else { return } self.offsetX = loaded })
The text was updated successfully, but these errors were encountered:
No branches or pull requests
ScrollView(.horizontal, showsIndicators: false)
{
ScrollViewReader
{ proxy in
LazyHStack(spacing: 0)
{
ForEach(0...timeLine.allDay(), id:.self)
{
dateItem in
VStack(spacing:0)
{
SK_Day(skDate: SKDate(
date: timeLine.getDateAtIndex(index: dateItem),
skManager: timeLine.skManager,
isDisabled: !timeLine.isEnabled(date: timeLine.getDateAtIndex(index: dateItem)),
isToday: timeLine.isToday(date: timeLine.getDateAtIndex(index: dateItem)),
isSelected: timeLine.isSpecialDate(date: timeLine.getDateAtIndex(index: dateItem)),
isBetweenStartAndEnd: timeLine.isBetweenStartAndEnd(date: timeLine.getDateAtIndex(index: dateItem))),
cellWidth: 24)
The text was updated successfully, but these errors were encountered: