Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
uiscrollviewをある値だけスクロールした後、uiscrollviewの現在のコントロールの位置を取得したいと思います。
scrollviewでのコントロールの位置は、実際にはスクロールによって変化しません。それで:
yourSubview.frame常に固定されています。スクロールビューでスクロールされたコンテンツの量を確認するには、次を確認しますscrollview.contentOffset。contentOffsetは、ご想像のとおり、デフォルトでCGPointから始まります:(0,0)スクロールすると、この値はそれに応じて更新されます。
yourSubview.frame
scrollview.contentOffset