Open2024/11/07にコメント追加4ScrollView の使い方SwiftUIykws2024/11/07https://developer.apple.com/documentation/swiftui/scrollview 返信を追加ykws2024/11/07UIKit でできていたことが SwiftUI だと実現できないと思っていたが、大体できそう https://developer.apple.com/documentation/uikit/uiscrollview 返信を追加ykws2024/11/07選択中の View を取得するのに ScrollView の中では Lazy 系を利用する https://developer.apple.com/documentation/swiftui/view/scrollposition(id:anchor:) iOS 17.5 限定かもしれないが、 Lazy 系ではない Stack だと scrollPosition が発火しない 返信を追加ykws2024/11/07UIScrollView のように無制限にスクロールさせるには .never を指定する https://developer.apple.com/documentation/swiftui/viewalignedscrolltargetbehavior/limitbehavior/never 返信を追加
ykws2024/11/07UIKit でできていたことが SwiftUI だと実現できないと思っていたが、大体できそう https://developer.apple.com/documentation/uikit/uiscrollview 返信を追加
ykws2024/11/07選択中の View を取得するのに ScrollView の中では Lazy 系を利用する https://developer.apple.com/documentation/swiftui/view/scrollposition(id:anchor:) iOS 17.5 限定かもしれないが、 Lazy 系ではない Stack だと scrollPosition が発火しない 返信を追加
ykws2024/11/07UIScrollView のように無制限にスクロールさせるには .never を指定する https://developer.apple.com/documentation/swiftui/viewalignedscrolltargetbehavior/limitbehavior/never 返信を追加