要调试焦点问题,可以在tvOS中使用_whyIsThisViewNotFocusable
方法,但是在shouldUpdateFocusInContext
的调试中使用这个命令,如po [mainView _whyIsThisViewNotFocusable]
或po mainView _whyIsThisViewNotFocusable
,它给了我错误:
error: <EXPR>:1:9: error: consecutive statements on a line must be separated by ';'
mainView _whyIsThisViewNotFocusable
那么_whyIsThisViewNotFocusable的正确用法是什么?
我在一些堆栈溢出的答案中看到了这个问题,但由于声誉较低,我无法在该帖子/答案中发表评论
大概你正在使用swift,所以你不应该在调试器中使用obj-c。而是使用:
po mainView.performSelector(Selector("_whyIsThisViewNotFocusable"))