【发布时间】:2016-12-02 06:18:28
【问题描述】:
我正在使用 Swift 3。在我的代码中,我在 Wallet App 中使用 Siri 集成。我在该 App 中遇到错误。我在谷歌上搜索了它,但我没有找到它的解决方案。
这是我的代码:
func createPath(_ points: NSArray) -> UIBezierPath {
let path = UIBezierPath()
var point = CGPoint()
//CGPointMakeWithDictionaryRepresentation((points[0] as! CFDictionary), &point)
point.makeWithDictionaryRepresentation((points[0] as! CFDictionary)) // In this line I am getting an error
path.move(to: point)
var index = 1
while index < points.count {
//CGPointMakeWithDictionaryRepresentation((points[index] as! CFDictionary), &point)
point.makeWithDictionaryRepresentation((points[index] as! CFDictionary))
path.addLine(to: point)
index = index + 1
}
path.close()
return path
}
这是我得到的错误:
“CGPoint”类型的值没有成员“makeWithDictionaryRepresentation”
任何人都可以帮我解决它。 提前致谢。
【问题讨论】:
-
错误清楚地表明
CGPoint没有像makeWithDictionaryRepresentation这样的成员。那么如何设置或调用它呢?