2011年7月12日火曜日

UITableView のセクションヘッダー

UITableView のセクションヘッダーに関するメソッドは以下の3つ
  • – tableView:titleForHeaderInSection:
  • – tableView:viewForHeaderInSection:
  • – tableView:heightForHeaderInSection:
タイトルを変更するだけならtableView:titleForHeaderInSection: を実装すればよく、独自の View を表示したいなら tableView:viewForHeaderInSection: でヘッダーの高さを返し、tableView:heightForHeaderInSection: で表示したい UIView を返す。これで TableView のスクロールに追従する Viewを挿入できる。


0 件のコメント:

コメントを投稿