我打开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
但我点击它后面的按钮。
注:
cellForRowAtIndexPath
,numberOfRowsInSection
,heightForRowAtIndexPath
这些都是做工精细,所以与DataSource
或Delegate
注意没有问题:不使用任何
Gesture
在我的viewController。
我认为有一些问题层,我申请z位置还可以,但doen't工作..
编辑 我只是做酥料饼view.hidden = true或false上编辑文本框..
有没有解决方法?
你需要解释表视图的显示方式/添加到屏幕上时,关于做是为了你已经表明 – Wain
其他代码看来你的tableview去你后面的按钮。当你显示UITableview时,使用'[self.view bringSubviewToFront:YOUR_TABLEVIEW];' – Hima
同时检查Debug view Hierarchy。 – Hima