mutableString
変更可能属性付き文字列から変更可能文字列を返します
解説
変更可能属性付き文字列から変更可能文字列を返します。
返り値
( NSMutableString * )
変更可能文字列
引数
フレームワーク
Foundation
クラス
NSMutableAttributedString
Instance Methods
使用可能
10.0
参照
例文
#import "MyObject.h" @implementation MyObject - (IBAction)myAction:(id)sender { NSMutableAttributedString *maStr =[[[NSMutableAttributedString alloc] initWithString:@"AttributedString" attributes:[self boldFontAttributes]] autorelease]; [myOutlet setAttributedStringValue:maStr]; NSLog([maStr mutableString]); } - (NSDictionary*)boldFontAttributes { return [NSDictionary dictionaryWithObject: [NSFont boldSystemFontOfSize:[NSFont systemFontSize]] forKey:NSFontAttributeName]; } @end