Iphone開発は初めてです。選択した(複数の)セル(チェックマーク付き)の値を他のビューのラベルとして表示したいテーブルビューコントローラーがあります。これを達成するにはどうすればよいですか?これは、テーブルビューセルをマークするチェックに使用するコードです
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
UITableViewCell *thisCell = [tableView cellForRowAtIndexPath:indexPath];
if (thisCell.accessoryType == UITableViewCellAccessoryNone) {
thisCell.accessoryType = UITableViewCellAccessoryCheckmark;
}else
{
thisCell.accessoryType = UITableViewCellAccessoryNone;
}
}
- (UITableViewCellAccessoryType)tableView:(UITableView *)tableView accessoryTypeForRowWithIndexPath:(NSIndexPath *)indexPath {
return UITableViewCellAccessoryNone;
}