你好,我想在我的自定义annotationView重写的drawRect,所以当我写annotationView覆盖drawRect中,阿尔法图像
[[_mapView viewForAnnotation:annotation] setNeedsDisplay];
我的注解视图将被重绘,我也不会删除注释和补充它再次。
,这里是我的drawRect
- (void)drawRect:(CGRect)rect {
UIImage* theImage = nil;
if(_pinType == T_UNKNOWN) theImage = [UIImage imageNamed:@"imgU.png"];
else theImage = [UIImage imageNamed:@"imgK.png"];
[theImage drawInRect:rect];
}
的问题是,我的图片与α和阿尔法部分为黑色。
所以也许有人知道这个解决方案或一些建议呢? 我读了很多关于这个帖子,也使用核心图形,但没有找到解决方案..
在此先感谢!
非常感谢!就是这样! – Lukas 2012-02-11 07:56:21