TextSizingExample

Last Revision:
Version 1.2, 2012-06-05
Updated for Mac OS X 10.7
(Full Revision History)
Build Requirements:
Xcode 4.0 or later, Mac OS X v10.7 or later
Runtime Requirements:
Mac OS X v10.7 or later

This example demonstrates different ways of configuring the objects in the Cocoa text system. The app displays a window where different examples of NSTextViews with different sizing properties can be shown. A pop-up button at the top of the window controls which example is visible.

In most of the examples, the same NSTextStorage is used and the example contains an NSLayoutManager that adds itself to the shared NSTextStorage and one or more pairs of NSTextContainer and NSTextView objects. By default this NSTextStorage loads this ReadMe file, but you can load a new file or edit the text.