-tableView:numberOfRowsInSection:
INDEX>UIKit>UITableViewDataSource
それぞれのセクションに項目がどれくらいあるのかを返します。
-(NSInteger)tableView:(UITableView *)tableView
numberOfRowsInSection:(NSInteger)section
解説
それぞれのセクションに項目がどれくらいあるのかを返します。
返り値
( NSInteger )
引数
( UITableView * )tableView
( NSInteger )section
フレームワーク
UIKit
クラス
UITableViewDataSource
Instance Methods
使用可能
iPhone2.0
参照
例文
//それぞれのセクションに項目がどれくらいあるのか - (NSInteger)tableView:(UITableView *)tv numberOfRowsInSection:(NSInteger)section { // Only one row for each section switch (section) { case 0: return 1; break; case 1: return 3; break; case 2: return 2; break; } return 5; }