美文网首页
mac 隐藏titlebar

mac 隐藏titlebar

作者: 不要和哥闹 | 来源:发表于2020-07-02 16:00 被阅读0次
self.window.titlebarAppearsTransparent = true;
self.window.titleVisibility = .hidden
self.window.toolbar = nil
self.window.styleMask.insert(.fullSizeContentView)
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
    
    guard let windowScene = (scene as? UIWindowScene) else { return }
    
    #if targetEnvironment(macCatalyst)
    if let titlebar = windowScene.titlebar {
        titlebar.titleVisibility = .hidden
        titlebar.toolbar = nil
    }
    #endif

}

修改close button 位置
https://stackoverflow.com/questions/30085631/nswindow-change-positions-of-window-buttons

相关文章

网友评论

      本文标题:mac 隐藏titlebar

      本文链接:https://www.haomeiwen.com/subject/rxyrqktx.html