I have a NSSlider and I'm trying to scale it with the code:
let circle = NSSlider(frame: NSRect(x: 0.0, y: 333.0, width: 50.0, height: 50.0))
circle.layer?.setAffineTransform(CGAffineTransform(scaleX: 20.0, y: 20.0))
circle.wantsLayer = true
circle.sliderType = .circular
but this line does not work:
circle.layer?.setAffineTransform(CGAffineTransform(scaleX: 20.0, y: 20.0))
is there some other command in MacOS for scaling? I've tried to do as I was doing in iOS but it does not work I'm trying to make it x2 times bigger
The code
CGAffineTransform(scaleX: 20.0, y: 20.0)
would make the slider TWENTY times bigger! You should useCGAffineTransform(scaleX: 2.0, y: 2.0)
to make it 2x biggger