0
如何在Swift中使用「setLineWidth」和「setLineJoin」屬性和CGContextSetTextDrawingMode?使用具有setLineWidth屬性的CGContextSetTextDrawingMode(drawRect函數)
override func drawRect(rect: CGRect) {
let context = UIGraphicsGetCurrentContext()
CGContextSetTextDrawingMode(context, CGTextDrawingMode.Stroke)
context?setLineWidth(2)
context.setLineJoin(CGLineJoin.Round)
}
只有屬性(setLineWith和setLineJoin)不起作用。 它在一年前工作。但現在它不起作用。
謝謝!我沒有更新到最新版本的swift。現在它正在工作! –
不客氣! – Rob