Why not create directly an NSScrollView ?
It is advised in Apple's doc:
Typically, you don’t need to program with scrollers; instead, you configure them with an
NSScrollView
object
If you still need to create programmatically, could you show how you created the scroll bars ?
I have create a short demo code without problem, just setting the frame rectangle.
@IBOutlet weak var viewWithScrollers: NSView!
let hScroll = NSScroller(frame: NSRect(x: 0, y: 0, width: 160, height: 12))
hScroll.scrollerStyle = .legacy
let vScroll = NSScroller(frame: NSRect(x: viewWithScrollers.frame.width - 12, y: 0, width: 12, height: 100))
vScroll.scrollerStyle = .overlay
viewWithScrollers.addSubview(vScroll)
viewWithScrollers.addSubview(hScroll)