gpt4 book ai didi

ios 7 initWithOverlay 已弃用

转载 作者:塔克拉玛干 更新时间:2023-11-02 09:15:16 25 4
gpt4 key购买 nike

这个弃用方法的替代逻辑是什么

MKPolylineView *polylineView = [[MKPolylineView alloc] initWithOverlay:overlay];
polylineView.lineWidth = 3;
polylineView.strokeColor = [[UIColor alloc] initWithRed:5.0/255 green:102.0/255 blue:48.0/255 alpha:1];


MKCircleView *circleView = [[MKCircleView alloc] initWithOverlay:overlay];
circleView.strokeColor = [UIColor blueColor];
circleView.fillColor = [[UIColor blueColor] colorWithAlphaComponent:0.4];
circleView.lineWidth = 2;

最佳答案

引用MKPolylineViewMKCircleView的文档:

// Prefer MKPolylineRenderer
MKPolylineRenderer *polylineView = [[MKPolylineRenderer alloc] initWithOverlay:overlay];
polylineView.lineWidth = 3;
polylineView.strokeColor = [[UIColor alloc] initWithRed:5.0/255 green:102.0/255 blue:48.0/255 alpha:1];

//Prefer MKCircleRenderer
MKCircleRenderer *circleView = [[MKCircleRenderer alloc] initWithOverlay:overlay];
circleView.strokeColor = [UIColor blueColor];
circleView.fillColor = [[UIColor blueColor] colorWithAlphaComponent:0.4];
circleView.lineWidth = 2;

关于ios 7 initWithOverlay 已弃用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27606841/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com