问题标签 [siri-remote]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
0 回答
548 浏览

uigesturerecognizer - tvOS:检测暂停按钮按下

我试图检测用户何时按下遥控器上的播放/暂停按钮。我创建了一个点击手势识别器并将其附加到 AVPlayerViewController 子类的视图中。

当按下“播放”按钮时,手势可以正常触发,但在按下“暂停”按钮时不会。任何想法为什么?

0 投票
2 回答
2004 浏览

xcode - 有什么方法可以禁用 UITextField 的听写支持?

所以我正在快速开发一个 tvos 应用程序,我想知道是否可以禁用对自定义 UITextField 的听写支持。它并不能很好地工作,我不希望用户能够这样做

0 投票
1 回答
239 浏览

swift - 当 UIButton 获得焦点时,Siri Remote 的菜单按钮不退出应用程序

我最重要pressesBegan的是接收选择新闻。当焦点位于UIButton. 如果没有聚焦 UI 元素,则菜单按钮按预期工作。

当焦点位于 a 时,如何接收菜单按钮按下UIButton

0 投票
0 回答
57 浏览

swift - 无法在视图之间覆盖 siri 菜单按钮

因此,我已经能够使用 tapGesture 识别器成功覆盖菜单按钮的默认行为。我有这样的东西

但似乎在转换和转场期间(如在一个视图控制器被另一个视图控制器替换/覆盖之间的动画中),如果按下菜单按钮,它似乎会退回到将视图控制器从堆栈中弹出的默认设置。我觉得我已经尝试了一切,包括:

  • 根本不删除tapgesturerecognizer
  • 在调用视图外观函数的超级方法之前调用它们
  • 将 Tapgesturerecognizer 添加到底层导航控制器(继承它)
  • 覆盖 pressesBegan、pressesCancelled 和 pressesEnded。在这种情况下,它会捕获菜单按下,但尽管我从未调用过他们的超级方法,但视图仍然会弹出。我真的迷路了。
0 投票
0 回答
170 浏览

uitextfield - 听写和 UITextfield 的问题

在 tvOS 9.2 上,将UITextField键盘类型设置为UIKeyboardTypeNumberPad.

似乎当您开始听写时,没有添加任何输入。这是一个错误吗?有没有人遇到过这个?

0 投票
1 回答
401 浏览

swift - 覆盖播放/暂停按钮时允许使用 Siri 远程菜单按钮

此代码允许我覆盖播放/暂停按钮并且它可以正常工作。但是,现在我必须长按菜单按钮才能返回 Apple TV OS 菜单。

无论如何按下菜单按钮时,它会直接返回操作系统菜单,而播放/暂停按钮会继续执行我当前的逻辑吗?恐怕如果单击菜单不返回操作系统菜单,我的应用程序可能会被拒绝。

0 投票
1 回答
197 浏览

tvos - 如何识别音频播放器的快进和快退手势?

我正在开发一个带有音频播放器的 tvOS 应用程序,我需要使用与 Apple Music 和其他音频应用程序相同的手势来支持快进和快退。具体而言,快进时,用户按住遥控器触摸表面的右侧,而快退时,用户按住左侧。

我正在创建两个UILongPressGestureRecognizer实例,一个用于快进,一个用于倒带,并将它们添加到视图控制器的顶级视图中。对于快进手势识别器,我设置allowedPressTypes@[UIPressTypeRightArrow],对于快退识别器,我设置allowedPressTypes@[UIPressTypeLeftArrow]。但是这些手势没有任何效果。

谁能提供正确实现这些手势的示例代码?

0 投票
1 回答
311 浏览

swift - tvos swift spritekit - UITapGestureRecognizer 没有响应

我根本无法让这个手势做出回应。

和功能:

按下模拟器遥控器上的播放按钮时没有任何反应。我错过了什么?

0 投票
0 回答
85 浏览

swift - How would you move a UIView on screen using siri remote touchpad on tvOS

tvOS is so strongly built around the Focus Engine that it is unclear what one can do to move an item, let's say a simple UIView on the screen, rather than move the focus from one static object to another.

So far I've managed to create a Pan Gesture which calls a function that changes the position of the view by a certain number of points but it does not feel fluid. If you swipe on the touch pad during video scrolling the position marker slides fluidly depending on the swipe strength/distance. Is there a way to implement this on the UIView to move it across the screen in a way that matches touch on the remote touch pad?

Alternatively, would it be better or is there a possibility to move the UIView in a way that matches the finger position on the touch pad (more or less)? I know there are no absolute coordinates on the touch pad but perhaps this can be approximate. It would be a cursor like effect although not actually creating a cursor as a pointing mechanism (which I know is not allowed on tvOS).

Thanks in advance.

0 投票
1 回答
66 浏览

tvos - 如何以编程方式检查 tvOS 中是否启用了听写?

有没有办法以编程方式检查 tvOS(Siri 遥控器)中是否启用了听写?