标签:sel screen indicator nts ica customer horizon view 调用
class CustomerController: BaseViewController { override func viewDidLoad() { super.viewDidLoad() setupUI() } override func setupUI() { let scrollView = UIScrollView(frame: self.view.bounds) scrollView.isScrollEnabled = true scrollView.contentSize = CGSize(width: UIScreen.cz_screenWidth(), height: UIScreen.cz_screenHeight()*2) scrollView.showsHorizontalScrollIndicator = false scrollView.showsVerticalScrollIndicator = true scrollView.scrollsToTop = true self.view.addSubview(scrollView) } 」
代码如上,结果显示的时候竟然出现scroll滚动之后,背景里面还有未滚动的样子,傻眼了,差了几小时才记起来在父Controller里面已经吊用了setupUI方法,这里super后重复调用了setupUI导致此bug,回去抽自己个嘴巴。。。。
标签:sel screen indicator nts ica customer horizon view 调用
原文地址:https://www.cnblogs.com/iaoc/p/9759511.html