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.
プログラムでView Controller内にあるスクロールビューのオフセットを設定する方法はありますか?
さまざまな条件に基づいて設定する必要があります。
はい、スクロールビューの contentOffset を設定できます-コードは次のようになります-
if(your Condition) { [scrollView setContentOffset:CGPointMake(0,-50) animated:YES]; }
はい、
scrollView.contentOffset
ドキュメント: http://developer.apple.com/library/ios/#documentation/uikit/reference/UIScrollView_Class/Reference/UIScrollView.html