macOS/iOS API解説

iOS , Mac アプリケーション開発のために使われる主要フレームワークの日本語情報です。2010年代に書かれた内容です。今後更新はありません。

目次

layoutManagers

テキストストレージのレイアウトマネージャーを返します

解説

テキストストレージのレイアウトマネージャー(NSLayoutManager)を返します。

返り値

( NSArray * )

レイアウトマネージャー

引数

フレームワーク

ApplicationKit

クラス

NSTextStorage

Instance Methods

使用可能

10.0

参照

- addLayoutManager:
- removeLayoutManager:

例文

#import "MyObject.h"
//TextViewからこのクラスにdelegateしている
@implementation MyObject


- (IBAction)myAction:(id)sender
{
NSTextStorage *textSt;
NSLayoutManager *lm1 = [[NSLayoutManager alloc] init ];
NSLayoutManager *lm2 = [[NSLayoutManager alloc] init];
textSt = [myOutlet textStorage];

[textSt addLayoutManager:lm1];
[textSt addLayoutManager:lm2];

NSLog([[textSt layoutManagers] description]);

}

@end