GitHub - salsisan/NSTextView-LineNumberView: Add line numbers to an instance of NSTextView. The line number view is implemented as a subclass of NSRulerView. · GitHub
Skip to content

salsisan/NSTextView-LineNumberView

 
 

Folders and files

Repository files navigation

NSTextView+LineNumberView

Add line numbers to an instance of NSTextView.

Screenshot

Example

import Cocoa

// Your view controller
class ViewController: NSViewController {

    // The text view you wish to add line number view to
    @IBOutlet var mainTextView: NSTextView!
    
    override func viewDidLoad() {
        super.viewDidLoad()

        mainTextView.lnv_setUpLineNumberView()
    }
}

About

Add line numbers to an instance of NSTextView. The line number view is implemented as a subclass of NSRulerView.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

Contributors

Languages

  • Swift 100.0%