UITableView section index related crashes under iOS 7

后端 未结 4 1649
感动是毒
感动是毒 2021-02-15 06:33

I have a simple section index for a table view that appears fine for the first time but then crashes if certain kinds of interaction happens that force a redraw of the section i

4条回答
  •  死守一世寂寞
    2021-02-15 07:15

    The issue seemed to have to do with a reloadData call being attempted from a background thread on a background thread, in my case. I guess the data in the view was inconsistent with the index or something like that.

    Weird how it manifests itself in the form seen in the CoreText library (as seen in the stack trace above) and on iOS 7 only.

    When dispatching the call on the main queue to reload the table view's data, reloading performance improved and I could use the section index again. I haven't had that crash since.

    See if doing that fixes it for you.

提交回复
热议问题