[英]iOS: Tapping on UITableView does not call didSelectRowAtIndexPath
[英]Tapping on section(Height 400.0f) View of UITableview calls didSelectRowAtIndexPath
我有一個UITableview帶有一個高度為400的部分,當我向下滾動並點擊View部分時,它將調用didSelectionRowAtIndexPath。 因此,如何檢測/識別它是剖面圖?
您不能點擊該部分,則可以點擊該部分中的行。
如果您有多個部分,並且要對兩個部分應用與添加不同的邏輯,
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
switch(section){
case 0:
return [array count];
break;
case 1:
return [array count];
break;
}
}
因此,它僅調用RowsInSection。
您只需在剖面視圖上添加UIButton或UITapGestureRecognizer並創建您自己的偵聽器方法即可。 然后不調用didSelectRowAtIndexPath方法
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.