ChrisFreeMan
V2EX  ›  Swift

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

  •  
  •   ChrisFreeMan · May 2, 2022 · 1833 views
    This topic created in 1596 days ago, the information mentioned may be changed or developed.

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

    class MyAvPlayerView: AVPlayerView {
        
        override func scrollWheel(with event: NSEvent) {
            return
        }
    }
    
    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1127 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 23:03 · PVG 07:03 · LAX 16:03 · JFK 19:03
    ♥ Do have faith in what you're doing.