小编use*_*883的帖子

如何使用tvOS接收触摸?

如何使用模拟器使用tvOS接收触摸?我们需要知道触摸位置.UIPress - 没有它!

-(void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(nullable UIEvent *)event {
    // Never called
}

-(void)pressesEnded:(NSSet<UIPress *> *)presses withEvent:(nullable UIPressesEvent *)event {
    // Works fine!
}
Run Code Online (Sandbox Code Playgroud)

objective-c tvos

8
推荐指数
2
解决办法
6652
查看次数

标签 统计

objective-c ×1

tvos ×1