不同Y级别的UIButton不能集中在tvOS上 [英] UIButton on different Y level can't be focused on tvOS

查看:139
本文介绍了不同Y级别的UIButton不能集中在tvOS上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开始开发苹果电视的应用程序,我有这个问题惠特按钮。我有一个屏幕,其中有几个按钮在屏幕的底部,然后有一个,这是在中间(见截图了解)。问题是我不能集中中间的按钮。重点只在底部的三个按钮。这个问题很明显是由 Y位置造成的,当我移动屏幕底部的按钮时,它会变得焦点。

按钮被创建在故事板中,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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆