navigationController?.navigationBar.translucent = false
searchTableView = UITableView(frame: view.frame, style: UITableViewStyle.Grouped)
searchTableView.frame.size.height -= 64 // 当 translucent = false 时,如果高度不减去navigationBar的高度,则内容溢出。
当不设置 translucent 时,则内容刚好填满 view。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
是的,当translucent = false的时候,VC中的布局就会回到iOS 6以前那样,y==0的位置是navigationbar底部。相比iOS 7以后从屏幕顶部开始计算刚好相差64像素
在storyboard或者xib里面选中对应的ViewController,取消选中划线的两条
