我对使用 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];
}