Last active
October 5, 2018 03:10
-
-
Save rockarts/ce1fffebd8c874c3c778c549b4284cd0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ViewController: UIViewController { | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
let draw = DrawView(frame: self.view.bounds) | |
view.addSubview(draw) | |
} | |
} | |
class DrawView: UIView { | |
override init(frame: CGRect) { | |
super.init(frame: frame) | |
} | |
required init?(coder aDecoder: NSCoder) { | |
fatalError("init(coder:) has not been implemented") | |
} | |
override func draw( _ rect: CGRect) { | |
} | |
func drawLine(x:Int, y:Int, width:Int, height:Int) { | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment