How to create a ICNS icon programmatically?
问题 OK this is what I want : Take some NSImage s Add them to an ICNS file Save it This is what I've done so far (purely as a test) : - (CGImageRef)refFromImage:(NSImage*)img { CGImageSourceRef source; source = CGImageSourceCreateWithData((CFDataRef)[img TIFFRepresentation], NULL); CGImageRef maskRef = CGImageSourceCreateImageAtIndex(source, 0, NULL); return maskRef; } - (void)awakeFromNib { NSImage* img1 = [NSImage imageNamed:@"image1"]; NSImage* img2 = [NSImage imageNamed:@"image2"]; NSLog(@"%@"