extraLineFragmentTextContainer
テキストの本文で空の最後の行を表示するテキストコンテナを返します
解説
テキストの本文で空の最後の行を表示するテキストコンテナを返します。
挿入ポイントを表示するためのもの。
返り値
( NSTextContainer * )
テキストコンテナ
引数
フレームワーク
ApplicationKit
クラス
NSLayoutManager
Instance Methods
使用可能
10.0
参照
- extraLineFragmentRect
- extraLineFragmentUsedRect
- setExtraLineFragmentRect:usedRect:textContainer:
例文
#import "MyObject.h" @implementation MyObject - (IBAction)myAction:(id)sender { //myOutletはTextView NSTextContainer *textContainer; NSTextContainer *textContainer2; NSLayoutManager *layM; layM = [myOutlet layoutManager]; [myOutlet insertText:@"aaaaaaaaaaaaaaaaaaaa"]; textContainer = [layM textContainerForGlyphAtIndex:3 effectiveRange:nil]; [layM setExtraLineFragmentRect:NSMakeRect(0,0,10,10) usedRect:NSMakeRect(0,0,10,10) textContainer:textContainer]; textContainer2 = [layM extraLineFragmentTextContainer]; NSLog([NSString stringWithFormat:@"%@",[textContainer2 description]]); } @end