Skip to content

Instantly share code, notes, and snippets.

@tkc
Created September 3, 2016 12:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tkc/c6f0707d389cd5d00e83640136faed98 to your computer and use it in GitHub Desktop.
Save tkc/c6f0707d389cd5d00e83640136faed98 to your computer and use it in GitHub Desktop.
class CustomLabel: UILabel {
override func willMoveToSuperview(newSuperview: UIView?) {
print("willMoveToSuperview")
}
override func didMoveToSuperview() {
print("didMoveToSuperview")
}
override func willMoveToWindow(newWindow: UIWindow?) {
print("willMoveToWindow")
}
override func didMoveToWindow() {
print("didMoveToWindow")
}
override func didAddSubview(subview: UIView) {
print("didAddSubview")
}
override func willRemoveSubview(subview: UIView) {
print("willRemoveSubview")
}
override func drawTextInRect(rect: CGRect) {
print("drawTextInRect")
}
}
class CustomView: UIViewController{
override func viewDidLoad() {
super.viewDidLoad()
print("viewDidLoad")
}
override func viewWillAppear(animated: Bool) {
super.viewDidDisappear(animated)
print("viewWillAppear")
}
override func viewDidAppear(animated: Bool) {
super.viewDidAppear(animated)
print("viewDidAppear")
}
override func viewWillDisappear(animated: Bool) {
super.viewWillDisappear(animated)
print("viewWillDisappear")
}
override func viewDidDisappear(animated: Bool) {
super.viewDidDisappear(animated)
print("viewDidDisappear")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment