我对使用 Objective C 进行图像绘制还很陌生。在 iPhone 开发中,我已经完成了图像的绘制,但现在我想在 Mac 上进行。简而言之,下面的 iPhone 代码在 Mac 上有什么等效的实现方式?
- (void) drawRect: (CGRect) rect
{
[super drawRect:rect];
UIImage *anotherimage = [UIImage imageNamed:@"alert.png"];
CGPoint imagepoint = CGPointMake(10,0);
[anotherimage drawAtPoint:imagepoint];
}