【问题标题】:Getting an error CGPathAddPath is unavailable: Use addPath(_:transform) Using Xcode 8.0 [duplicate]出现错误 CGPathAddPath 不可用:使用 addPath(_:transform) 使用 Xcode 8.0 [重复]
【发布时间】:2016-09-28 11:16:19
【问题描述】:

遇到错误。

CGPathAddPath 不可用:使用 addPath(_:transform) 使用 Xcode 8.0

for index in 0...(chars.count - 1) 
{

let letter = CTFontCreatePathForGlyph(borderFont, glyphs[index], nil)              

var t = CGAffineTransform(translationX: xPosition , y: 0)

CGPathAddPath(letters, &t, letter)

xPosition = xPosition + advances[index].width

}

【问题讨论】:

标签: ios swift swift3 ios10 xcode8


【解决方案1】:

像这样使用addPath(_:transform)

 letters.addPath(letter, transform:t)

查看CGMutablePath 上的 Apple 文档了解更多详情。

【讨论】:

  • 它的工作...谢谢:)
  • 欢迎朋友 :)
猜你喜欢
  • 1970-01-01
  • 2017-01-03
  • 1970-01-01
  • 2020-05-22
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多