Swift:将按钮添加到底部栏NSWindow [英] Swift: Adding button to bottom bar NSWindow

查看:280
本文介绍了Swift:将按钮添加到底部栏NSWindow的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个底部栏:



window.setContentBorderThickness(24.0,forEdge:NSRectEdge.MinY)



是否可以在底部边框中添加按钮?

解决方案

底部边框只是一个背景,要添加视图到它,只需将它们添加到窗口的contentView 。您可以在Interface Builder中执行此操作。




I created a bottom bar by doing:

window.setContentBorderThickness(24.0, forEdge: NSRectEdge.MinY)

Is it possible to add a button into the bottom border?

解决方案

The bottom border is just a background, to add views to It, just add them to the bottom edge of the window's contentView. You can do that in Interface Builder.

Sample project

这篇关于Swift:将按钮添加到底部栏NSWindow的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆