MKPinAnnotationView: Are there more than three colors available?

前端 未结 9 1366

According to the Apple docs, MKPinAnnotationView\'s pin color is available in red, green and purple. Is there any way to get other colors also? I\'ve found nothing in the do

9条回答
  •  自闭症患者
    2020-11-27 10:27

    I tried this way and it seems to be ok...

    UIImage * image = [UIImage imageNamed:@"blue_pin.png"];
            UIImageView *imageView = [[[UIImageView alloc] initWithImage:image]
                                     autorelease];
            [annotationView addSubview:imageView];
            annotationView = nil;
    

    using the complete pin image... as the yonel example

提交回复
热议问题