SwiftUIで開発していると、ScrollViewからスクロール量を取得してViewを操作したい(動かしたり、opacityを変更したり、表示・非表示させたり)ケースが時々あるが、現状UIKitと違ってSwiftUIにはスクロール量を取得する方法はなく、力技でやるしかなさそう。
SwiftUIの画面レイアウト前編 の続きです。 1 HStackとVStack、2 ZStack は前編をご覧ください。 SwiftUIで複数の要素を組み合わせた場合の関係や効果をサンプルで解説します。 ※この記事ではSwift言語(最新の5.1)の基本的な知識を前提にしています。コード内の ...
When adding padding for parent of ScrollView and/ or adding element before it, e.g. custom header, scroll bar has some padding on both top and bottom. This seems to be only happening with using only ...
when using a trackpad to scroll a tabbar inside a scrollview the dominant scroll gesture isn't captured by the scrollview or the tabbar. both vertical and horizontal scroll are active same time.