我在 UIViewController 中有一个 UITableView,如下所示:
。H
@interface OutageListViewController : UIViewController<UITableViewDelegate,UITableViewDataSource> {
IBOutlet UITableView *outageTable;
.m
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
NSLog(@"Selected");
}
我有自定义表格单元格:
//编辑我在我的自定义视图上并排触发了 UILabel,以及遍布整个区域的背景。但是在调整/删除我放在自定义单元格上的背景图像和标签之后,仍然没有调用“didSelectRowAtIndexPath”。//结束编辑
@interface AbstractSummaryListViewCell : UITableViewCell {...}
和
@interface FiveColumnSummaryCell : AbstractSummaryListViewCell {...}
这个 UIView 在另一个 UIView 里面:
@interface CustomTabBarController : UIViewController {
OutageListViewController *outageListViewController;
我的 AppDelegate 将其添加到窗口中:
[window addSubview:[customTabBarController view]];
现在我正在尝试确定单击了哪个单元格并且没有调用 didSelectRowAtIndexPath,我有数据源并委托从 UITableView 连接到文件的所有者,实际上数据正确填充为我的“cellForRowAtIndexPath”指定,任何想法我怎么能解决这个问题?
谢谢!