NSCustomImageRep:delegate
Home 目次>ApplicationKit>NSCustomImageRep

delegate

デリゲートオブジェクトを返します


-(id) delegate


【返り値】
   idデリゲートオブジェクト


【解説】

デリゲートオブジェクトを返します。



【例文】


#import "MyObject.h"

@implementation MyObject

- (
IBAction )myAction:( id )sender
{
NSSize siz = [myOutlet frame].size;
NSImage *img;
NSCustomImageRep *customImgRep = [[NSCustomImageRep alloc] initWithDrawSelector:
@selector (draw) delegate: self ];
img = [[[NSImage alloc] initWithSize : siz] autorelease ];
[img addRepresentation:customImgRep];
[myOutlet setImage:img];

NSLog([[customImgRep delegate]className]);
}

-(
void )draw
{
[[NSColor redColor] set];
[[NSBezierPath bezierPathWithOvalInRect : NSMakeRect(
20 , 0 , 100 , 100 )] fill ];
}

@end


(C) 2000-2007 Satoshi Oomori.
[Apple]

Google
Webwww.oomori.com
Apple_Store_40x120

[ad:Usual day in Japan]

この記事を評価してください。 

良い 

間違いがある 説明がわかりにくい 例文がわかりにくい  

Home 目次>ApplicationKit>NSCustomImageRep
修正日2006.12.26