3 ms·
It's a real shame that Apple doesn't release the source to a recent version of TextEdit. Given its structure (more or less just a stock objects from the API) it
by dkjaudyeqooe 3y ago
It's a real shame that Apple doesn't release the source to a recent version of TextEdit. Given its structure (more or less just a stock objects from the API) it would be super educational for anyone who wants to use NSTextView et al.
- deleted 3y ago[deleted]
- krzyzanowskim 3y agoFor the educational purpose of modern TextKit and NSTextView-like implementation, you can check out https://github.com/krzyzanowskim/STTextView https://github.com/krzyzanowskim/STTextView that is modern re-implementation of the text view.
- deleted 3y ago[deleted]
- jwells89 3y agoYeah, you can get pretty close to TextEdit by just dropping an NSTextView into the document window XIB of a document-based Mac app, hooking up the data methods in your Document class to it, and doing a little bit of wiring of menu items to the textview. Text formatting bar, rulers, Find in Page, font panel, etc. There’s a few things missing but not a ton. The document-based app template gets you a lot for “free” too, including tabs and conversion of windows into tabs and vice versa.