Version: 1.0

Posted: 2009-05-27

Build Requirements: Xcode 3.2 or later, Mac OS X v10.6 or later

Runtime Requirements: Mac OS X v10.6 or later

View Source Code:

Download Sample Code (“TextSizingExample.zip”, 55.0K)



Description

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.

Document Revision History

Date Notes
2009-05-27This example demonstrates different ways of configuring the objects in the Cocoa text system.