2010年6月8日火曜日

UIScrollView


UIScrollViewはUITableViewの親クラスでもあり、アプリケーションウィンドウより大きなコンテンツをサポートする。スワイプジェスチャーでのスクロールを可能とし、ピンチでのズームなどもできる。

Managing the Display of Content

  • (void)setContentOffset:(CGPoint)contentOffset animated:(BOOL)animated
  •  レシーバの起点からのオフセットを指定する。
  •  例:
  •  Information BuilderでUITableView上にSearchBarを置き、実行プログラムで0,44にオフセットするとSearchBarは隠れて表示される。この場合スクリーン上部のステータスをクリックするとオフセットは解除され、SearchBarが表示される。もしくはテーブルを下に引き下ろしてもSearchBarが表示される。
  •   contentOffset  property
  •   contentSize  property
  •   contentInset  property

Managing Scrolling


Managing the Scroll Indicator


Zooming and Panning


Managing the Delegate