superVC:sSuperVC
override func viewDidLoad() {
super.viewDidLoad()
setupUI()
}
override func setupUI() {
print(123)
}
subVC:superVC
override func viewDidLoad() {
super.viewDidLoad()
}
override func setupUI() {
print(456)
}
输出456,因为创建的是子类,无论在哪里call func,都是self.call除非声明super.call
网友评论