小编moh*_*hem的帖子

如何在 swift 4 中添加虚线折线?

我已经在 Swift4 中有一条折线,如何将它的样式设置为虚线/虚线?

  let   path = GMSMutablePath(path: GMSPath())
    for marker in markerList {
        bounds = bounds.includingCoordinate(marker.position)
        path.add(marker.position)

    }



    let polyline = GMSPolyline(path: path)
    polyline.strokeColor = UIColor(named: "Primary")!
    polyline.strokeWidth = 3.0
    polyline.geodesic = true
    polyline.map = mapView
Run Code Online (Sandbox Code Playgroud)

喜欢这张地图

ios swift swift3 xcode8 xcode9

4
推荐指数
1
解决办法
1102
查看次数

标签 统计

ios ×1

swift ×1

swift3 ×1

xcode8 ×1

xcode9 ×1