1 つのセルをクリックすると UItableview が表示され、セル内のデータを取得したいので、別のコントローラーで UIlabel に割り当てて表示する必要があります。
そのコントローラーには、セルデータをそれに更新したいUIlabelがあります。
誰でも私がこれに慣れていないのを手伝ってもらえますか
(UITableViewCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *cellidentifier=@"cell";
UITableViewCell *cell=[tableview dequeueReusableCellWithIdentifier:cellidentifier];
if (cell==nil) {
cell=[[UITableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellidentifier];
}
cell.textLabel.text=[array objectAtIndex:indexPath.row];
return cell;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
Companydetails *details1= [[Companydetails alloc] initWithNibName:@"Companydetails" bundle:nil];
details1.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
[self presentModalViewController:details1 animated:NO];
[details1 release];
UITableViewCell *cell=[tableView cellForRowAtIndexPath:indexPath];
}