不同Y级别的UIButton不能集中在tvOS上 [英] UIButton on different Y level can't be focused on tvOS
问题描述
按钮被创建在故事板中,ViewController中没有代码。中间按钮的故事板中的设置与底部按钮的设置相同。我是否必须在代码中手动处理?还是有可能像这样得到焦点运动?我会很感激任何信息,谢谢。
我还在开发模拟器。
我被苹果引导到解决方案。它使用UIFocusGuide需要一些编码。苹果有一个示例代码。
I started developing apps for Apple TV and I have this problem whit buttons. I have a screen where are several buttons on bottom of the screen and then there is one, which is in the middle (see screenshot to understand). The problem is that I can't get focused the middle button. Focus is only on bottom three buttons. The problem is obviously caused by the Y position, when I move the button on bottom of the screen, it gets focused.
Buttons are created in storyboard, there is no code in ViewController. Settings in storyboard for the middle button are equal with settings for bottom buttons. Do I have to handle this manually in code? Or is it even possible to get focus movement like this? I would appreciate any information, thanks.
I'm still developing in simulator.
So I was guided by apple to the solution. It requires a little coding using UIFocusGuide. Apple has a sample code for this.
这篇关于不同Y级别的UIButton不能集中在tvOS上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!