小编Yas*_*edi的帖子

线程池:DispatchQueue.main.async

我从事过Java工作,并且对线程和线程池的工作非常清楚.

我想知道是否有人能解释如何创建线程的工作并在swift的线程池中分配空间?

还有

Dispatch.main.async {
 // some code
}
Run Code Online (Sandbox Code Playgroud)

创建新线程还是异步执行任务?

在此先感谢=)

grand-central-dispatch threadpool ios swift swift3

3
推荐指数
1
解决办法
1290
查看次数

在Google Maps上绘制虚线圆圈:iOS

我一直在努力在Google地图上画一个虚线圆圈,但找不到任何帮助...

我一直在互联网上浏览数日,找到了一些在GoogleMaps上绘制虚线圆的解决方案,但我每次都会得到答案,而不是绘制一个普通圆。

这是我所做的:

带圆圈的地图

上面的代码是:

import UIKit
import GoogleMaps
import GooglePlaces

class ViewController: UIViewController
{
    @IBOutlet weak var gmsMapView: GMSMapView!

    override func viewDidLoad()
    {
        super.viewDidLoad()

        gmsMapView.isMyLocationEnabled = true
        gmsMapView.settings.myLocationButton = true
        gmsMapView.animate(toZoom: 10.0)
        gmsMapView.animate(toLocation: CLLocationCoordinate2D(latitude: 40.709677, longitude: -74.011088))
        let circleCenter = CLLocationCoordinate2D(latitude: 40.709677, longitude: -74.011088)
        let circle = GMSCircle(position: circleCenter, radius: 5000)
        circle.strokeWidth = 2
        circle.strokeColor = UIColor.blue
        circle.map = gmsMapView
    }

    override func didReceiveMemoryWarning(){
        super.didReceiveMemoryWarning()
    }
}
Run Code Online (Sandbox Code Playgroud)

这是必需的:

在此处输入图片说明

google-maps objective-c ios swift3

3
推荐指数
1
解决办法
649
查看次数