ChrisFreeMan
V2EX  ›  Swift

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

  •  
  •   ChrisFreeMan · May 2, 2022 · 1659 views
    This topic created in 1514 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   ·   Solana   ·   3257 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 11:13 · PVG 19:13 · LAX 04:13 · JFK 07:13
    ♥ Do have faith in what you're doing.