UIViewController のプロパティとして UITableView があり、特定の行のセルに[tableView cellForRowAtIndexPath:indexPath]
.
1 つのメソッド呼び出しで、次の複数の呼び出しが表示されると予想する必要があります。
- (UITableViewCell *)tableView:(UITableView *)aTableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
私の UITableViewCell のそれぞれには、アクセスしようとしているテキスト データの UITextField があります。
これが私がやっていることです:
for (int section = 0; ix < countOfSections; ++section)
{
NSInteger countOfRowsInSection = // attained
for (int row = 0; row < countOfRowsInSection; ++row)
{
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:row inSection:section];
// the follow call seems to elicit multiple invocations
// on my table delegate's
// - (UITableViewCell *)tableView:(UITableView *)aTableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
UITableViewCell *cell = [self.tableview cellForRowAtIndexPath:indexPath];
// Access some custom data
}
}
すべてのセクションと行の UITableViewCell のそれぞれの UITextField に格納されているすべてのデータにアクセスするより良い方法はありますか?