2017-12-07 13 views
0

NSButton을 새로 만들 때 어떻게 스타일을 기본값으로 설정할 수 있습니까?스위프트 3 macOS, 기본 버튼 스타일 설정

let (nomplusbut) = NSButton(frame: CGRect(x: 200, y: iy, width: 300, height: 40)) 
(nomplusbut).title = "Pfad öffnen..." 
(nomplusbut).target = (self, action: #selector(buttonAction)) as AnyObject? 
(nomplusbut).isBordered = true 
(nomplusbut).setButtonType(NSMomentaryPushInButton) 

arraybut.append(nomplusbut) 

print(array[array.count - 1].stringValue) 
self.view.addSubview(arraybut[arraybut.count - 1]) 

스타일은 내가 갖고 싶어 :

button with default style

현재 스타일 :

button with current style

답변

0

당신은 변경해야합니다 버튼의 bezelStylerounded에, 예컨대 :

nomplusbut.bezelStyle = .rounded 
+0

우수, 대단히 감사합니다! – pikkuez