在我的程序中有两个视图控制器。第一个有表格视图。当我单击一个单元格时,相关的炎症会显示在第二个视图控制器中。它运作良好。
当我回到第一个视图控制器时。再次单击单元格现在它不起作用。代表团当时不工作。
我这样导航
-(void)gotoviewUnfinishedMinute
{
NSArray *vc=[self.navigationController viewControllers];
ViewControllerView *vcView=nil;
for (int i=0; i<[vc count]; i++)
{
UIViewController *tempVC=[vc objectAtIndex:i];
if([tempVC isKindOfClass:[ViewControllerView class]])
{
vcView=[vc objectAtIndex:i];
break;
}
}
if(vcView)
{
[vcView setMeetingMinute:[unfinishedMinutes objectAtIndex:selectedRow]];
[self.navigationController popToViewController:vcView animated:NO];
vcView = nil;
}
else
{
ViewControllerView *vc3New = [self.storyboard instantiateViewControllerWithIdentifier:@"vcview"];
[vc3New setMeetingMinute:[unfinishedMinutes objectAtIndex:selectedRow]];
[self.navigationController pushViewController:vc3New animated:NO];
vc3New = nil;
}
vc = nil;
}
像这样的表视图委托
- (void)viewDidLoad
{
[super viewDidLoad];
self.tableViewLastMinutes.dataSource = self;
self.tableViewLastMinutes.delegate = self;
}
我怎么解决这个问题?