我有一个像这样的 UIViewController
+View
button1
button2
backgroundImage
ScrollView
scrollBackgroundImage
scrollButton1
scrollButton2
所有按钮都是自定义类型
如果初始焦点在 button1
上,那么无论我做什么,焦点都不会转到 scrollView
内的按钮。
如果初始焦点在 button2
上,那么焦点永远不会转到 button1
/button2
。
如果我将所有按钮更改为键入 System,那么焦点将按预期开始工作。
最佳答案
实际上,焦点确实位于 button1
和 button2
之间。
如果您将按钮类型更改为Custom
,这意味着您应该自己处理视觉焦点更新(例如,在didUpdateFocusInContext(context: UIFocusUpdateContext, withAnimationCoordinator coordinator: UIFocusAnimationCoordinator)
方法)。
https://stackoverflow.com/questions/37264891/
相关文章:
ios - UIPageViewController 不允许识别 UIScreenEdgePanGe
amazon-web-services - AWS API Gateway 默认响应和触发器 AWS
clojure - 为什么我们在 Clojure 中需要所有 3 个 - tesser、transd
android - CardView 内的 ExpandableListView 不会改变其父级高度
python - Django模型实例的full_clean方法,是这样吗?
ios - 如何通过gcdwebserver获取本地html文件