构建libcurl + openssl。我不能使用https。我收到一个错误:SSL证书问题:无法获得本地颁发者证书。我可以不用
curl_easy_setopt( curl, CURLOPT_SSL_VERIFYHOST, 0 );
curl_easy_setopt( curl, CURLOPT_SSL_VERIFYPEER, 0 );
并加载https数据?
答案 0 :(得分:0)
我下载了cacert.pem(https://curl.haxx.se/docs/caextract.html),并粘贴了此选项。
let gradientFrame = CGRect(x: 0, y: 0, width: 1000, height: 150)
_progressGradientLayer.frame = gradientFrame
_progressGradientLayer.colors = [UIColor.red, UIColor.green, UIColor.red, UIColor.green, UIColor.red].map { $0.cgColor }
_progressGradientLayer.startPoint = CGPoint(x: 0, y: 0)
_progressGradientLayer.endPoint = CGPoint(x: 1, y: 0)
_progressGradientLayer.locations = [0, 0.25, 0.5, 0.75, 1]
_progressGradientLayer.mask = _progressLayer
self.layer.addSublayer(self._progressGradientLayer)
let progressPath = //some path
self._progressLayer.path = progressPath.cgPath
self._progressLayer.fillColor = self.selectedBackgoundColor.cgColor
self._progressLayer.frame = shapeFrame
//TODO: Apply the _blackLayer mask to the gradient