Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我可以通过子类化滚动视图来绘制自定义焦点环。我的问题是,如何测试 textVeiw(即在 scrollView 内)是否具有焦点,以更改焦点环。
您可以子类化文本视图并覆盖 becomeFirstResponder。当文本视图成为第一个响应者时,将调用该方法,方法是单击它或从另一个响应者中选择。