想要達到視圖從屏幕上邊緣就開始顯示怎麼做?
解決方案:
1、代碼
if (@available(iOS 11.0, *)) {
self.tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
} else {
self.automaticallyAdjustsScrollViewInsets = NO;
}
2、storyboard(在>=iOS11版本有效)
設置前後效果圖對比: