Skip to content

Instantly share code, notes, and snippets.

@yuhao-git-star
Created April 18, 2017 05:59
Show Gist options
  • Save yuhao-git-star/4ca42b93a5f2bc39bbbd8178784f0830 to your computer and use it in GitHub Desktop.
Save yuhao-git-star/4ca42b93a5f2bc39bbbd8178784f0830 to your computer and use it in GitHub Desktop.
class CircleView : UIView {
override func draw(_ rect: CGRect) {
let 畫筆 = UIBezierPath()
畫筆.move(to: .zero)
畫筆.addLine(to: CGPoint(x: 100, y: 100))
畫筆.stroke()
}
}
let view = CircleView(frame: CGRect(x: 0, y: 0, width: 300, height: 300))
view.backgroundColor = UIColor.white
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment