最終更新:2017-06-06 (火) 03:25:31 (2514d)
UITableView
Top / UITableView
構造
- セクション
- セル
関連
- UITableViewDelegate
- UITableViewDataSource?
Tasks
Initializing a UITableView Object
- initWithFrame:style?
Configuring a Table View
- style - プロパティ (UITableViewStyle?)
- numberOfRowsInSection?
- numberOfSections?
- rowHeight? - プロパティ (CGFloat)
- separatorStyle? - プロパティ (UITableViewCellSeparatorStyle?)
- separatorColor? - プロパティ (UIColor)
- backgroundView? - プロパティ (UIView)
Creating Table View Cells
- registerNib:forCellReuseIdentifier?
- registerClass:forCellReuseIdentifier?
- dequeueReusableCellWithIdentifier:forIndexPath?
- dequeueReusableCellWithIdentifier?
Accessing Header and Footer Views
- registerNib:forHeaderFooterViewReuseIdentifier?
- registerClass:forHeaderFooterViewReuseIdentifier?
- dequeueReusableHeaderFooterViewWithIdentifier?
- tableHeaderView? - プロパティ (UIView)
- tableFooterView? - プロパティ (UIView)
- sectionHeaderHeight? - プロパティ (CGFloat)
- sectionFooterHeight? - プロパティ (CGFloat)
- headerViewForSection?
- footerViewForSection?
Accessing Cells and Sections
- cellForRowAtIndexPath?
- indexPathForCell?
- indexPathForRowAtPoint?
- indexPathsForRowsInRect?
- visibleCells?
- indexPathsForVisibleRows?
Scrolling the Table View
- scrollToRowAtIndexPath:atScrollPosition:animated?
- scrollToNearestSelectedRowAtScrollPosition:animated?
Managing Selections
- indexPathForSelectedRow?
- indexPathsForSelectedRows?
- selectRowAtIndexPath:animated:scrollPosition?
- deselectRowAtIndexPath:animated?
- allowsSelection? - プロパティ (BOOL)
- allowsMultipleSelection? - プロパティ (BOOL)
- allowsSelectionDuringEditing? - プロパティ (BOOL)
- allowsMultipleSelectionDuringEditing? - プロパティ (BOOL)
Inserting, Deleting, and Moving Rows and Sections
- beginUpdates?
- endUpdates?
- insertRowsAtIndexPaths:withRowAnimation?
- deleteRowsAtIndexPaths:withRowAnimation?
- moveRowAtIndexPath:toIndexPath?
- insertSections:withRowAnimation?
- deleteSections:withRowAnimation?
- moveSection:toSection?
Managing the Editing of Table Cells
Reloading the Table View
- reloadData?
- reloadRowsAtIndexPaths:withRowAnimation?
- reloadSections:withRowAnimation?
- reloadSectionIndexTitles?
Accessing Drawing Areas of the Table View
Managing the Delegate and the Data Source
- dataSource? - プロパティ (UITableViewDataSource?)
- delegate - プロパティ (UITableViewDelegate)
Configuring the Table Index
- sectionIndexMinimumDisplayRowCount? - プロパティ (NSInteger)
- sectionIndexColor? - プロパティ (UIColor)
- sectionIndexTrackingBackgroundColor? - プロパティ (UIColor)
メモ
- iPhone OSのUITableViewクラスは、AppKitフレームワークのNSTableViewクラスとNSOutlineViewクラスの中間と考えることができます。この2つのAppKitクラスからの機能を使って、小さな画面でのデータの表示により適したツールを作成しています。UITableViewクラスは一度に1つの列を表示し、関連する行をセクションにグループ化できます。情報の階層的なリストを表示したり編集するための手段でもあります。
- UIKitのコントロールは、セルを使いません。セルは、Mac OS Xではビューに代わる軽量な手段として使われます。UIKitでは、ビュー自体が非常に軽量なオブジェクトであるため、セルは必要ありません。命名規則に反して、UITableViewクラスで使うように設計されたセルが、実際にはUIViewクラスに基づいています。