macOS/iOS API解説

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

目次

selectedTextAttributes

選択文字列の文字属性を返します

解説

選択文字列の文字属性を返します。

返り値

( NSDictionary * )

文字列の属性

引数

フレームワーク

ApplicationKit

クラス

NSTextView

Instance Methods

使用可能

10.0

参照

- selectedRange (NSTextInput)
- setSelectedTextAttributes:

例文

#import "MyObject.h"

@implementation MyObject

- (IBAction)myAction:(id)sender
{
NSDictionary *dic;
[myOutlet setSelectedRange:NSMakeRange(1,3) affinity:NSSelectionAffinityUpstream stillSelecting:YES];

dic = [myOutlet selectedTextAttributes];

NSLog([dic description]);



}

@end