IOS Swift3.1 打印视图生命周期
来源:互联网 发布:java int 0x 编辑:程序博客网 时间:2024/05/22 04:24
import UIKit
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
}
// Dispose of any resources that can be recreated.
}
//////////////////////////////////////////////////////////////////////
override func loadView() {
super.loadView()
print( object_getClass(self), "-->", #function )
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
print( object_getClass(self), "-->", #function )
}
override func viewWillLayoutSubviews() {
super.viewWillLayoutSubviews()
print( object_getClass(self), "-->", #function )
}
override func viewDidLayoutSubviews() {
super.viewDidLayoutSubviews()
print( object_getClass(self), "-->", #function )
}
override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
print( object_getClass(self), "-->", #function )
}
override func viewWillDisappear(_ animated: Bool) {
super.viewDidAppear(animated)
print( object_getClass(self), "-->", #function )
}
override func viewDidDisappear(_ animated: Bool) {
super.viewDidAppear(animated)
print( object_getClass(self), "-->", #function )
}
//////////////////////////////////////////////////////////////////////
}
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()// Dispose of any resources that can be recreated.
}
//////////////////////////////////////////////////////////////////////
override func loadView() {
super.loadView()
print( object_getClass(self), "-->", #function )
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
print( object_getClass(self), "-->", #function )
}
override func viewWillLayoutSubviews() {
super.viewWillLayoutSubviews()
print( object_getClass(self), "-->", #function )
}
override func viewDidLayoutSubviews() {
super.viewDidLayoutSubviews()
print( object_getClass(self), "-->", #function )
}
override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
print( object_getClass(self), "-->", #function )
}
override func viewWillDisappear(_ animated: Bool) {
super.viewDidAppear(animated)
print( object_getClass(self), "-->", #function )
}
override func viewDidDisappear(_ animated: Bool) {
super.viewDidAppear(animated)
print( object_getClass(self), "-->", #function )
}
//////////////////////////////////////////////////////////////////////
}
阅读全文
0 0
- IOS Swift3.1 打印视图生命周期
- IOS Swift3.1 打印系统所有字体
- Swift3.0-视图控制器的生命周期
- IOS Swift3.1打印所有已经加载的viewcontroller
- IOS视图生命周期
- iOS 视图的生命周期
- iOS 视图生命周期
- iOS视图生命周期
- iOS视图生命周期
- iOS视图的生命周期
- iOS视图生命周期
- iOS视图生命周期
- iOS 视图控制器生命周期
- IOS视图加载生命周期
- IOS视图生命周期
- iOS开发:视图生命周期
- iOS视图的生命周期
- iOS视图生命周期解析
- ThinkPHP 验证码错误
- 关于Java中常用的集合类总结
- 浅谈Java中的hashCode和HashMap
- MySQL中的复制全表到新表
- andorid TextView(3)-使用HTML标签
- IOS Swift3.1 打印视图生命周期
- 进程间通信---消息队列
- 手把手教你搭建NDK开发环境以及基于JNI开发的简单DEMO
- STM32用SPI方式控制OLED模块
- mysql分组取每组前几条记录(排序)
- iOS开发:设置App名称,设置App icon图标,设置App启动图
- android TextView(4)-SpannableString&SpannableStringBuffer定制文本
- ReactNative 学习资源大汇集
- BigInteger 转 BigDecimal 问题