2016-03-04 54 views
0

我打开popupView里面有TextView的onEditing事件中的TableView。popupView中没有调用UITableview的didSelectRowAtIndexPath

我正在设置数据源&为tableview同时进行委托。 我已经设置为多属性泰伯维

1)AllowSelection =是

2)userInterectionEnabled =是

3)tableview.layer.zposition = 1

4)[self.view bringSubViewToFront:实现代码如下]

下面的代码..

UITableView *tblCompany = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, [UtilClass getScreenWidth]-[UtilClass getScreenWidth]/4, 200)]; 
tblCompany.dataSource = self; 
tblCompany.delegate = self; 
tblCompany.userInteractionEnabled=YES; 
tblCompany.allowsSelection=YES; 
tblCompany.separatorStyle=UITableViewCellSeparatorStyleNone; 
[self.popOver addSubView:tblCompany]; 

我的问题

我有一个按钮&标签在我的viewController许多控件。 当我编辑到我的文本字段弹出窗口打开了按钮。

当我尝试点击tableView的单元格时,它不叫didSelectRowAtIndexPath但我点击它后面的按钮。

注:cellForRowAtIndexPathnumberOfRowsInSectionheightForRowAtIndexPath这些都是做工精细,所以与DataSourceDelegate

注意没有问题:不使用任何Gesture在我的viewController。

我认为有一些问题层,我申请z位置还可以,但doen't工作..

编辑 我只是做酥料饼view.hidden = true或false上编辑文本框..

有没有解决方法?

+0

你需要解释表视图的显示方式/添加到屏幕上时,关于做是为了你已经表明 – Wain

+0

其他代码看来你的tableview去你后面的按钮。当你显示UITableview时,使用'[self.view bringSubviewToFront:YOUR_TABLEVIEW];' – Hima

+0

同时检查Debug view Hierarchy。 – Hima

回答

1

检查您的tableview是否在运行应用程序时位于前端。

enter image description here

+0

我只是检查它和popOver查看是在前面.. – Simmy

+0

您不能在调试视图层次结构中选择行吗? – Hima

+0

是的,我可以选择层次结构中的行... – Simmy

相关问题