我想将子视图NIB /自定义tableViewCell弹出到视图控制器。问题是当我单击地图点时,弹出窗口与最新的点击结果重叠。我希望子视图刷新而不是继续弹出一个新的。
//Pop up map details
GLfloat topOffset = self.view.frame.size.height/3.6;
UIView *modalView = [[[NSBundle mainBundle] loadNibNamed:@"LocateUsDetailsTableViewCell" owner:self options:nil] objectAtIndex:0];
[modalView setFrame:CGRectMake(0, 0, CGRectGetWidth(self.view.bounds), topOffset)];
[self.view addSubview:modalView]; //reloads the view from the nib
[UIView animateWithDuration:0 animations:^{
CGRect currentRect = modalView.frame;
currentRect.origin.y = self.view.frame.size.height/1.35;
[modalView setAlpha:1];
[modalView setFrame:currentRect];
[self.view bringSubviewToFront:modalView];
}];