builds
parent
2c9da90662
commit
82fec8363e
|
@ -196,14 +196,11 @@ func makeVerseView(seg: SegDenorm) -> some View {
|
||||||
}
|
}
|
||||||
|
|
||||||
struct ContentView: View {
|
struct ContentView: View {
|
||||||
|
// this is for the whole view swiping
|
||||||
@State var viewState = CGSize.zero
|
@State var viewState = CGSize.zero
|
||||||
@State var pulledOut = CGSize.zero
|
@State var pulledOut = CGSize.zero
|
||||||
|
|
||||||
@State var thisScrollView: UIScrollView?
|
// scroll location of the main fenestra
|
||||||
@State var scrollUpdate = false
|
|
||||||
@State var initLoad = false
|
|
||||||
|
|
||||||
// set this to scroll to area
|
|
||||||
@State var scrollId: String?
|
@State var scrollId: String?
|
||||||
@State var scrollOffset: CGFloat?
|
@State var scrollOffset: CGFloat?
|
||||||
|
|
||||||
|
@ -396,36 +393,7 @@ struct ContentView: View {
|
||||||
Print(gesture.translation.height)
|
Print(gesture.translation.height)
|
||||||
|
|
||||||
Print("drag")
|
Print("drag")
|
||||||
|
|
||||||
// if (endedDrag) {
|
|
||||||
// endedDrag = false
|
|
||||||
// scrollOffset = readOffset.y - 20
|
|
||||||
// // _ = Print("meow")
|
|
||||||
// }
|
|
||||||
//// logger.error("hello222")
|
|
||||||
//// NSLog("hellooo")
|
|
||||||
// Print(viewState.width)
|
|
||||||
// if (abs(gesture.translation.width) > 20) {
|
|
||||||
// viewState.width = gesture.translation.width
|
|
||||||
// }
|
|
||||||
////offset.y = gesture.translation.width
|
|
||||||
//// logger.log("hello")
|
|
||||||
}
|
}
|
||||||
// .onEnded { _ in
|
|
||||||
// endedDrag = true
|
|
||||||
// var pulledOutWidth = CGFloat(0)
|
|
||||||
// if (viewState.width < 0) {
|
|
||||||
// pulledOutWidth = CGFloat(0)
|
|
||||||
// }
|
|
||||||
// else if abs(viewState.width + pulledOut.width ) > 30 {
|
|
||||||
// pulledOutWidth = CGFloat(200)
|
|
||||||
// }
|
|
||||||
|
|
||||||
// withAnimation(.spring(response: 0.2)) {
|
|
||||||
// pulledOut.width = pulledOutWidth
|
|
||||||
// viewState = .zero
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
)
|
)
|
||||||
|
|
||||||
ScrollViewReader { _ in
|
ScrollViewReader { _ in
|
||||||
|
@ -473,10 +441,7 @@ struct ContentView: View {
|
||||||
if endedDrag {
|
if endedDrag {
|
||||||
endedDrag = false
|
endedDrag = false
|
||||||
scrollOffset = readOffset.y - 20
|
scrollOffset = readOffset.y - 20
|
||||||
// _ = Print("meow")
|
|
||||||
}
|
}
|
||||||
// logger.error("hello222")
|
|
||||||
// NSLog("hellooo")
|
|
||||||
Print(viewState.width)
|
Print(viewState.width)
|
||||||
if abs(gesture.translation.width) > 20 {
|
if abs(gesture.translation.width) > 20 {
|
||||||
viewState.width = gesture.translation.width
|
viewState.width = gesture.translation.width
|
||||||
|
@ -484,8 +449,6 @@ struct ContentView: View {
|
||||||
dragOffset = gesture.translation.width + 50
|
dragOffset = gesture.translation.width + 50
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// offset.y = gesture.translation.width
|
|
||||||
// logger.log("hello")
|
|
||||||
}
|
}
|
||||||
.onEnded { _ in
|
.onEnded { _ in
|
||||||
endedDrag = true
|
endedDrag = true
|
||||||
|
|
Loading…
Reference in New Issue