-1
我需要从这个库中获得不同颜色的GIF:https://github.com/samvermette/SVPulsingAnnotationView我可以从自定义的MKAnnotationView中获得gif吗?
在图书馆里我有机会获得MKAnnotationView层。但我需要生成的注释的动画gif用于非iOS项目。
我需要从这个库中获得不同颜色的GIF:https://github.com/samvermette/SVPulsingAnnotationView我可以从自定义的MKAnnotationView中获得gif吗?
在图书馆里我有机会获得MKAnnotationView层。但我需要生成的注释的动画gif用于非iOS项目。
我用renderInContext
从CALayer(结果)创建PNG。然后我使用python创建了gif。
UIGraphicsBeginImageContextWithOptions(result.bounds.size, result.opaque, 0.0);
[result renderInContext:UIGraphicsGetCurrentContext()];
UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
NSString *pngFilePath = [NSString stringWithFormat:@"%@/blue dot.png",docDir];
NSData *data1 = [NSData dataWithData:UIImagePNGRepresentation(image)];
[data1 writeToFile:pngFilePath atomically:YES];