setAttachmentCell:
アタッチメントセルをセットします
-(void)setAttachmentCell:(id <NSTextAttachmentCell>)aCell:
解説
アタッチメントセルをセットします。
返り値
( void )
なし
引数
( id <NSTextAttachmentCell> )aCell
セル
フレームワーク
ApplicationKit
クラス
NSTextAttachment
Instance Methods
使用可能
10.0
参照
- setFileWrapper:
- setImage:(NSCell)
-icon (NSFileWrapper)
- attachmentCell
例文
#import "MyObject.h" @implementation MyObject - (IBAction)myAction:(id)sender { //テキストアタッチメント NSTextAttachment *theAttachment; NSTextAttachmentCell *bCell = [[[NSTextAttachmentCell alloc] initImageCell:nil] autorelease]; //ファイルラッパ //テキストアタッチメント theAttachment = [[[NSTextAttachment alloc] init] autorelease]; [theAttachment setAttachmentCell:bCell]; // [[myOutlet textStorage] appendAttributedString: [NSAttributedString attributedStringWithAttachment:theAttachment]]; } @end