解決UITableView和UIScrollView偏移64像素問題
在AppDelegate中添加一下代碼:
if (@available(iOS 11.0, *))
{
[[UIScrollView appearance] setContentInsetAdjustmentBehavior:UIScrollViewContentInsetAdjustmentNever];
}
解決調(diào)用系統(tǒng)相冊導(dǎo)航欄遮擋問題
在創(chuàng)建UIImagePickerController時添加去掉毛玻璃效果:
- (UIImagePickerController *)imagePickerController
{
if (_imagePickerController == nil) {
_imagePickerController = [[UIImagePickerController alloc]init];
_imagePickerController.delegate = self;
// 去除毛玻璃效果
_imagePickerController.navigationBar.translucent = NO;
_imagePickerController.modalPresentationStyle = UIModalPresentationOverFullScreen;
}
return _imagePickerController;
}
解決webView頁面跳轉(zhuǎn)偏移問題
在創(chuàng)建WKWebView時添加代碼:
if (@available(iOS 11.0, *))
{
_webView.scrollView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
}
解決搜索框不顯示問題
新建一個基于UIView的一個類簇捍,然后將UISearchBar添加在這個這個類的對象上愚争。
持續(xù)更新中。。沫屡。。