- 博客(1)
- 收藏
- 关注
原创 swift Mac 开发 窗口标题栏获取
在mac开发中,有时候我们需要对标题栏进行一些自定义,以下是获取标题栏代码: let titleView = self.window?.standardWindowButton(.closeButton)?.superview 注意,此处如果需要修改背景色,修改出来的效果和真是效果存在差异. 直接修改背景色效果: titleView?.wantsLayer = true titleView?.layer?.backgroundColor = NSColor.gray.cgColor 添加一个layer
2021-04-08 16:25:36
261
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人