-2
無法使用此代碼不會在SWIFT 3編譯:'CGAffineTransformMake' 是在迅速3
let flipVertical = CGAffineTransformMake(1, 0, 0, -1, 0, newSize.height)
context.concatenate(flipVertical)
我將如何轉換這種過度?
無法使用此代碼不會在SWIFT 3編譯:'CGAffineTransformMake' 是在迅速3
let flipVertical = CGAffineTransformMake(1, 0, 0, -1, 0, newSize.height)
context.concatenate(flipVertical)
我將如何轉換這種過度?
在斯威夫特3,這些自由豎立的功能已經被替換爲init
語法:
let flipVertical = CGAffineTransform(a: 1, b: 0, c: 0, d: -1, tx: 0, ty: newSize.height)
CGAffineTransformMake
變成CGAffineTransform
並且初始值設定器現在需要它的標籤。
let flipVertical = CGAffineTransform(a: 1, b: 0, c: 0, d: -1, tx: 0, ty: newSize.height)
context.concatenate(flipVertical)
欲瞭解更多信息,檢查出CGAffineTransform
的documentation。
你看的'CGAffineTransform'的文檔? – rmaddy
我沒有意識到它被重命名爲沒有'make'的名字。 –
它未被重命名。 – rmaddy