AX ERROR when using Accessibility Inspector for iOS app.

二次信任 提交于 2019-12-12 08:21:19

问题


I'm testing an iPhone app with the simulator. Whenever I click on certain elements, I receive this error in console:

AX ERROR: Could not find my mock parent, most likely I am stale.

This error does not seem to cause any side-effects. I can use the app and examine the elements freely. Any idea what it may be caused by?


回答1:


https://github.com/freerangecode/FRCTableViewDataSources/commit/8d6fbfe8520a94275dd1e1e175ee445e4e0f2b01

Change made to fix issue, you might need to pull changes and update your library.




回答2:


For me the problem was that the code path eventually called

[tableView beginUpdates]
[tableView endUpdates]

within the tableView:cellForRowAtIndexPath: method.

Removing the call got rid of these AX Error log messages as well as a bunch of other UI glitches.




回答3:


Cool!

I just have this strange error when using MJPopupBackgroundView. After checking its codes for a while, I noticed that, the author added a UITableView to another UIViewController's view as a sub view, but he didn't add the table's view controller to the other UIViewController as a child view controller.

So the solution is quite easy, after adding a sub view like this:

[parentViewController.view addSubview:childViewController.view];

You only need to add one more line like this:

[parentViewController addChildViewController:childViewController];

Voila!



来源:https://stackoverflow.com/questions/6878530/ax-error-when-using-accessibility-inspector-for-ios-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!