UITableViewオブジェクトを初期化する
テーブルビューを構成する
– (UITableViewCell *)dequeueReusableCellWithIdentifier:(NSString *)identifier- identifierで指定するタイプのCellが解放された(キューからはずされた)、再利用可能なCellポインターを取得する。再利用可能なCellがなければnilが返る。
styleproperty– numberOfRowsInSection:– numberOfSectionsrowHeightpropertyseparatorStylepropertyseparatorColorpropertybackgroundViewpropertytableHeaderViewpropertytableFooterViewpropertysectionHeaderHeightpropertysectionFooterHeightpropertysectionIndexMinimumDisplayRowCountproperty
セルとセクションにアクセスする
– (UITabelViewCell *)cellForRowAtIndexPath:(NSIndexPath *)indexPath– indexPathForCell:– indexPathForRowAtPoint:– indexPathsForRowsInRect:– visibleCells– indexPathsForVisibleRows
テーブルビューを並び替える
– scrollToRowAtIndexPath:atScrollPosition:animated:– scrollToNearestSelectedRowAtScrollPosition:animated:
行選択を管理する
– indexPathForSelectedRow– selectRowAtIndexPath:animated:scrollPosition:– (void)deselectRowAtIndexPath:(NSIndexPath *)indexPath animated:(BOOL) animated選択してハイライトしている行を非選択とする。animatedでYESとすると背景にフェードアウトする。allowsSelectionpropertyallowsSelectionDuringEditingproperty
セルの挿入及び削除
– beginUpdates– endUpdates– insertRowsAtIndexPaths:withRowAnimation:– deleteRowsAtIndexPaths:withRowAnimation:– insertSections:withRowAnimation:– deleteSections:withRowAnimation:
テーブルセルの編集を管理する
editingproperty– setEditing:animated:
テーブルビューを再読込みする
– (void)reloadData- レシーバの行とセクション(ヘッダ、フッタ、セルを含むテーブルの構造)を再読み込みし、再表示する。
– reloadRowsAtIndexPaths:withRowAnimation:– reloadSections:withRowAnimation:– reloadSectionIndexTitles
テーブの描画エリアにアクセスする
デリゲートとデータソースを管理する
dataSourcepropertydelegateproperty
0 件のコメント:
コメントを投稿