我注意到,无论我使用哪种图像,它的图像大小都比MacOS菜单栏中的其他应用程序的图像要小一些.
这是我在可可中使用的代码:
private lazy var statusItem: NSStatusItem = NSStatusItem()
statusItem = NSStatusBar.system.statusItem(withLength: NSStatusItem.variableLength)
if let button = statusItem.button {
button.image = NSImage(systemSymbolName: "wifi", accessibilityDescription: "1")
}
如何让我的图片大小和其他应用程序一样大?
结果是: