NSRulerView in macOS 26 draws into window title bar. Bug or feature?
07:29 12 Mar 2026

When attaching a vertical ruler to a scroll view the separator is drawn all the way to the top of the window (macOS 26 Tahoe) unlike macOS Sequoia 15.7.2, see screenshots.

vertical ruler on macOS 26 Tahoe vertical ruler on macOS Sequoia 15.7.2

Is this expected behaviour? Can it be "fixed" (as in getting the old behaviour)?

The screenshots were generated with a minimal SwiftUI app embedding an NSTextView and NSRulerView using NSViewRepresentable, see below.

struct CustomEditor: NSViewRepresentable {
    
    @Binding var text: String

    func makeNSView(context: Context) -> NSScrollView {
        let scrollView = NSTextView.scrollableTextView()
        let editorView = scrollView.documentView as! NSTextView

        scrollView.verticalRulerView = NSRulerView(scrollView: scrollView, orientation: .verticalRuler)
        scrollView.rulersVisible = true
        
        editorView.delegate = context.coordinator

        return scrollView
    }
    
    func updateNSView(_ scrollView: NSScrollView, context: Context) {
        context.coordinator.owner = self
    }
    
    func makeCoordinator() -> CustomEditorCoordinator {
        return CustomEditorCoordinator(owner: self)
    }
}
swiftui cocoa macos-sequoia macos-tahoe