How to disable word-wrap of NSTextView?
问题 NSTextView does word-wrap by default. How can I disable this? I'm making a JSON code viewer, so I have to disable this. 回答1: I got solution from: http://lists.apple.com/archives/cocoa-dev/2008/May/msg02396.html You have to set NSTextView's maximum width to very large number to make this work correctly. (Just copy maximum height) And enable horizontal scrolling of NSScrollView which is superview of the NSTextView. See these pictures: http://www.flickr.com/photos/47601728@N06/4759470529/ http:/