UITableView didSelectRowAtIndexPath:第一次点击时不被调用 [英] UITableView didSelectRowAtIndexPath: not being called on first tap

查看:140
本文介绍了UITableView didSelectRowAtIndexPath:第一次点击时不被调用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到 UITableView的 didSelectRowAtIndexPath 有问题。

我的表被设置,所以当我选择行它初始化一个新的视图控制器并推动它。

My table is setup so that when I select row it initializes a new view controller and pushes it.

第一次点击表中的任何行,该方法不会被调用。一旦我选择另一行,它就会开始正常工作。

The first time I tap any row in the table, the method does not get called. Once I select another row, it begins to work as normal.

我已通过在 didSelectRowAtIndexPath 。当添加一个 NSLog 到该方法时,我看到当我选择第二行,最终推新的视图控制器,我看到两个日志语句同时出现在控制台

I have verified this by setting a breakpoint on didSelectRowAtIndexPath. When adding an NSLog to the method I see that when I select the second row that finally pushes the new view controller, I see two log statements appear in the console at the same time.

有任何建议吗?

推荐答案

De selectRowAtIndexPath?

Any chance you accidentally typed didDeselectRowAtIndexPath?

这篇关于UITableView didSelectRowAtIndexPath:第一次点击时不被调用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆