Objective c 如何在xcode上的表视图中显示详细信息
如何在Objective c 如何在xcode上的表视图中显示详细信息,objective-c,uitableview,Objective C,Uitableview,如何在xcode上的表视图中创建10行,并在单击它们时将详细信息显示为警报?您必须在didselectrowatinexpath方法中编写逻辑 arr是NSMutablearray - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { UIAlertView *alert = [[UIAlertView alloc] initWithTitle: @"
xcode
上的表视图中创建10行,并在单击它们时将详细信息显示为警报?您必须在didselectrowatinexpath
方法中编写逻辑
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];
}
这是一个很好的教程