[問題] UITableView 點選必須長按才能呼叫問題
大家好
目前碰到的問題是
我在UITableView裡用xib客制Cell
當去使用didSelectRowAtIndexPath時候
必須要長按才能觸發這個event
就像是在cell上面加上了UILongPressGesture的感覺
但其它頁面的UITableView卻沒有這個問題
寫法完全一模一樣
不知為何同樣的寫法會有不同的回應時間
上網google的結果
大多是說是加了其他手勢的關係
但我並沒有加任何手勢event到裡面
可否麻煩各位給我一點指點
附上片段程式碼
- (void)viewDidLoad {
[super viewDidLoad];
[demoTableView registerNib:[UINib nibWithNibName:@"customTableViewCell" bundle:nil] forCellReuseIdentifier:@"Cell"];
}
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *cellIdentifier = @"Cell";
customTableViewCell *cell = (customTableViewCell *)[tableView dequeueReusableCellWithIdentifier:cellIdentifier];
if (!cell) {
cell = [[surveyTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIdentifier];
}
return cell;
}
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
NSLog(@"test");
}
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 218.161.94.83
※ 文章網址: https://www.ptt.cc/bbs/MacDev/M.1425801088.A.6AA.html
→
03/08 15:59, , 1F
03/08 15:59, 1F
→
03/08 16:34, , 2F
03/08 16:34, 2F
→
03/08 16:35, , 3F
03/08 16:35, 3F
→
03/09 10:48, , 4F
03/09 10:48, 4F
MacDev 近期熱門文章
PTT數位生活區 即時熱門文章