简体   繁体   English

调用cellForRowAtIndexPath但没有stacktrace

[英]cellForRowAtIndexPath is called but without stacktrace

Using Swift 3, the UITableView's func tableView(_ tableView: UITableView, cellForRowAt indexPath: @autoclosure @escaping IndexPath) -> UITableViewCell is being called. 使用Swift 3,将func tableView(_ tableView: UITableView, cellForRowAt indexPath: @autoclosure @escaping IndexPath) -> UITableViewCell UITableView的func tableView(_ tableView: UITableView, cellForRowAt indexPath: @autoclosure @escaping IndexPath) -> UITableViewCell I want to track who's calling this function. 我想跟踪谁在调用此函数。 As far as I know, this will only be called if there's a need for a cell to display. 据我所知,只有在需要显示一个单元格时才会调用此方法。 However, in stacktrace override internal func tableView(_ tableView: UITableView, numberOfRowsInSection section: @autoclosure @escaping Int) -> Int is not called and there is no stacktrace. 但是,在stacktrace中override internal func tableView(_ tableView: UITableView, numberOfRowsInSection section: @autoclosure @escaping Int) -> Int不调用override internal func tableView(_ tableView: UITableView, numberOfRowsInSection section: @autoclosure @escaping Int) -> Int并且没有stacktrace。 Could someone advice to where to start digging up? 有人可以建议从哪里开始挖掘吗? Thanks! 谢谢!

See attached screenshot 见附件截图 没有堆栈跟踪

By default, you only see the stack trace that contains debug symbols. 默认情况下,您仅看到包含调试符号的堆栈跟踪。 So you won't see many framework internals here. 因此,您在这里不会看到很多框架内部信息。

To see everything , there is a small button at the bottom of the stack trace window, third position from the right, that will enable also methods without debug symbols: 要查看所有内容 ,请在堆栈跟踪窗口的底部(位于右侧第三个位置)有一个小按钮,该按钮还将启用没有调试符号的方法:

启用/禁用完整堆栈跟踪

(In fact, it depends on your Xcode version; in older versions there is some sort of slider which will display more or less details in the stack trace). (实际上,这取决于您的Xcode版本;在较旧的版本中,有一些滑块会在堆栈跟踪中显示或多或少的细节)。

As @AndreasOetjen mentioned, this is a normal behavior because the method get's called from a UIKit Framework class. 正如@AndreasOetjen提到的,这是正常现象,因为从UIKit Framework类调用了方法get。 The call-stack in this Framework is hidden by default and can be opt-io by the mentioned buttons. 默认情况下,此框架中的调用堆栈是隐藏的,并且可以通过上述按钮选择加入。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM