您的位置:首页 > 移动开发 > IOS开发

IOS 构造和使用TableView(基于storyboard) (二)接收和处理Table View事件

2014-04-02 15:59 489 查看
当某个Cell被按下时触发的事件

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
if ([tableView isEqual:self.myTable]) {
NSString *temp = [NSString stringWithFormat:@"Cell %ld in Section %ld is selected",(long)indexPath.section,(long)indexPath.row];
UIAlertView *alert = [[UIAlertView alloc]initWithTitle:temp message:nil delegate:nil cancelButtonTitle:@"OK" otherButtonTitles: nil];
[alert show];
}
}

效果如下

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  ios uitableview
相关文章推荐