HTML5   发布时间:2022-04-27  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了如何在地图上填写iOS 7中的外部叠加圈大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
我需要地图上的圆圈周围填充空间与iOS7中的“提醒”应用程序相同.我认为需要使用方法applyFillPropertiesToContext:atZoomScale或fillPath:inContext:.

解决方法

解决了我的问题:

- (void)drawMapRect:(MKMapRect)mapRect zoomScale:(MKZoomScalE)zoomScale inContext:(CGContextRef)context
{
    // Fill full map rect with some color.
    CGRect rect = [self rectForMapRect:mapRect];
    CGContextSaveGState(context);
    CGContextAddRect(context,rect);
    CGContextSetFillColorWithColor(context,[UIColor colorWithWhite:0.0 alpha:0.4f].CGColor);
    CGContextFillRect(context,rect);
    CGContextRestoreGState(context);

    // Clip rounded hole.
    CGContextSaveGState(context);
    CGContextSetFillColorWithColor(context,[UIColor whiteColor].CGColor);
    CGContextSetBlendMode(context,kCGBlendModeClear);
    CGContextFillEllipseInRect(context,[self rectForMapRect:[self.overlay boundingMapRect]]);
    CGContextRestoreGState(context);

    // Draw circle
    [super drawMapRect:mapRect zoomScale:zoomScale inContext:context];
}

大佬总结

以上是大佬教程为你收集整理的如何在地图上填写iOS 7中的外部叠加圈全部内容,希望文章能够帮你解决如何在地图上填写iOS 7中的外部叠加圈所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。