V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
ChrisFreeMan
V2EX  ›  Swift

求救大佬 swiftUI 的 AVPlayerView 怎么样阻止用户的输入事件啊,比如空格播放/暂停,还有鼠标滚轮,第一次翻遍网上都找不到解决方法。

  •  
  •   ChrisFreeMan · 2022-05-02 15:28:28 +08:00 · 928 次点击
    这是一个创建于 724 天前的主题,其中的信息可能已经有所发展或是发生改变。

    已经尝试的方法覆盖父类的鼠标滚轮方法

    class MyAvPlayerView: AVPlayerView {
        
        override func scrollWheel(with event: NSEvent) {
            return
        }
    }
    
    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3354 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 12:13 · PVG 20:13 · LAX 05:13 · JFK 08:13
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.