Я добавил следующие строки кода:Как изменить цвет фона UIBezierPath?
var radius: CGFloat = UIScreen.mainScreen().bounds.width - 60
let path: UIBezierPath = UIBezierPath(roundedRect: CGRect(x: 0, y: 0, width: UIScreen.mainScreen().bounds.width, height: UIScreen.mainScreen().bounds.height), cornerRadius: 0)
let circlePath: UIBezierPath = UIBezierPath(roundedRect: CGRect(x: 30, y: (UIScreen.mainScreen().bounds.height - radius)/2 - (navigationController?.navigationBar.frame.height)!, width: radius, height: radius), cornerRadius: radius)
path.appendPath(circlePath)
, но это дает мне этот результат
Как я могу сделать мой круг цвет фона - clearColor()?
Я попытался это одно:
UIColor.whiteColor().setFill()
circlePath.fill()
Но это не имеет никакого смысла
Почему это не имеет никакого смысла? –
@ A-Live, это то, что я хочу знать :) –