有人可以向我解释客户端“ onMessage函数”的用途是什么? 我尝试添加console.log,但一无所获
var needsFirstScroll = true
override func viewDidLayoutSubviews() {
super.viewDidLayoutSubviews()
if(needsFirstScroll) {
var frame = CGRect() // placeholder, do your frame calculation here
scrollView.scrollRectToVisible(frame, animated: false)
}
}
override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
needsFirstScroll = false
}