tableView点击cell的方法写了,为什么不跳转界面
1个回答
展开全部
#pragma mark - UITableViewDelegate
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
if (tableView.tag == 10) {
UITableViewCell *cell=[tableView cellForRowAtIndexPath:indexPath];
cell.textLabel.highlightedTextColor=[UIColor blueColor];
self.RightTV.hidden=NO;
self.LineView.hidden=NO;
self.index=indexPath;
self.RightTV.delegate=self;
self.RightTV.dataSource=self;
[self.RightTV reloadData];
NSLog(@"tableView.tag == 10: %@",indexPath);
}else if (tableView.tag == 20){
//添加界面跳转
ViewController *vc = [[ViewController alloc] init];
[self.navigationController pushViewController:vc animated:YES];
//数据的传值
NSLog(@"tableView.tag == 20: %@",indexPath);
}
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
if (tableView.tag == 10) {
UITableViewCell *cell=[tableView cellForRowAtIndexPath:indexPath];
cell.textLabel.highlightedTextColor=[UIColor blueColor];
self.RightTV.hidden=NO;
self.LineView.hidden=NO;
self.index=indexPath;
self.RightTV.delegate=self;
self.RightTV.dataSource=self;
[self.RightTV reloadData];
NSLog(@"tableView.tag == 10: %@",indexPath);
}else if (tableView.tag == 20){
//添加界面跳转
ViewController *vc = [[ViewController alloc] init];
[self.navigationController pushViewController:vc animated:YES];
//数据的传值
NSLog(@"tableView.tag == 20: %@",indexPath);
}
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询