setAttributedTitle:
属性付き文字列をタイトルをセットします
-(void)setAttributedTitle:(NSAttributedString*)anAttributedString:
解説
属性付き文字列をタイトルをセットします。
返り値
( void )
なし
引数
( NSAttributedString* )anAttributedString
属性付き文字列
フレームワーク
ApplicationKit
クラス
NSFormCell
Instance Methods
使用可能
10.0
参照
例文
#import "MyObject.h" @implementation MyObject - (NSDictionary*)boldFontAttributes { return [NSDictionary dictionaryWithObject: [NSFont boldSystemFontOfSize:[NSFont systemFontSize]] forKey:NSFontAttributeName]; } - (IBAction)myAction:(id)sender { [form1 setAttributedTitle: [[NSMutableAttributedString alloc] initWithString:@"newForm:" attributes:[self boldFontAttributes]]]; NSLog([[form1 attributedTitle] string]); } @end