-(IBAction)onWarnInfo:(id)sender{
<span style="white-space:pre"> </span>UIButton *btn=(UIButton *)sender;
NSIndexPath *_indexPath=[NSIndexPath indexPathForRow:btn.tag inSection:0];
UITableViewCell *_cell=[_tableView cellForRowAtIndexPath:_indexPath];
CGRect rect=_cell.frame;
float offset_y=rect.origin.y- _tableView.contentOffset.y+30.0;
if (_warninfoView.superview) {
if (_warninfoIndex==btn.tag) {
[_warninfoView removeFromSuperview];
}
else{
//offy
[_warninfoView setFrame:CGRectMake(0, offset_y, 320, 80)];
}
}else{
_warninfoIndex=btn.tag;
[_warninfoView setFrame:CGRectMake(0, offset_y, 320, 80)];
[m_uivBackgound addSubview:_warninfoView];
}
}
cell上 button点击弹出信息提示框
最新推荐文章于 2018-07-07 15:12:39 发布