xcode
上のテーブルビューに10行を作成し、それらをクリックしたときにアラートとして詳細を表示するにはどうすればよいですか?
1 に答える
1
didselectRowAtIndexPath
メソッドにロジックを書く必要があります
arrはNSMutablearray
..
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
UIAlertView *alert = [[UIAlertView alloc] initWithTitle: @"Detail"
message:[arr objectAtIndex:indexPath.row]
delegate: nil
cancelButtonTitle:@"OK"
otherButtonTitles:nil];
[alert show];
}
于 2012-12-18T11:20:49.100 に答える