Chad Sellers of Useful Fruit Software presenting at Baltimore Cocoa on the Cocoa Text System. Video available at http://baltimorecocoa.com/post/1167471671/cocoa-text-system-video-slides
44. NSAttributedString
• Rich text
• Attributes applied over a range
• Foundation version not too useful alone
• AppKit Additions make it useful
45. NSAttributedString
• Rich text
• Attributes applied over a range
• Foundation version not too useful alone
• AppKit Additions make it useful
• Adds useful attributes (e.g. NSFontAttributeName)
46. NSAttributedString
• Rich text
• Attributes applied over a range
• Foundation version not too useful alone
• AppKit Additions make it useful
• Adds useful attributes (e.g. NSFontAttributeName)
• Methods for reading/writing common formats
47. NSAttributedString
• Rich text
• Attributes applied over a range
• Foundation version not too useful alone
• AppKit Additions make it useful
• Adds useful attributes (e.g. NSFontAttributeName)
• Methods for reading/writing common formats
• RTF/RTFD, HTML, Word Doc, Open XML, OpenDoc
60. NSTextStorage
• Subclass of NSMutableAttributedString
• Main text storage class used in Cocoa Text
• Manages NSLayoutManagers
61. NSTextStorage
• Subclass of NSMutableAttributedString
• Main text storage class used in Cocoa Text
• Manages NSLayoutManagers
• which layout text into text containers
65. NSTextView
• View for displaying/editing rich text
• Contains NSTextContainer
• NSLayoutManager lays out text here
66. NSTextView
• View for displaying/editing rich text
• Contains NSTextContainer
• NSLayoutManager lays out text here
• Lots of methods ready to be wired up in IB
67. NSTextView
• View for displaying/editing rich text
• Contains NSTextContainer
• NSLayoutManager lays out text here
• Lots of methods ready to be wired up in IB
• IB even has prebuilt menus to use them
80. UITextView
• Much simpler than NSTextView
• 10 properties and 2 methods
• vs. NSTextView/NSText’s 258 methods
81. UITextView
• Much simpler than NSTextView
• 10 properties and 2 methods
• vs. NSTextView/NSText’s 258 methods
• Limited simple styling
82. UITextView
• Much simpler than NSTextView
• 10 properties and 2 methods
• vs. NSTextView/NSText’s 258 methods
• Limited simple styling
• a few non-ranged attributes
83. UITextView
• Much simpler than NSTextView
• 10 properties and 2 methods
• vs. NSTextView/NSText’s 258 methods
• Limited simple styling
• a few non-ranged attributes
• Apple recommends UIWebView for
complex styling