为了适配iOS11下来刷新下下偏移问题,适配:
if (@available(iOS 11.0,*)) {
[UITableView appearance].estimatedRowHeight = 0;
[UITableView appearance].estimatedSectionHeaderHeight = 0;
[UITableView appearance].estimatedSectionFooterHeight = 0;
[UIScrollView appearance].contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
}
导致问题:
1.storyboard默认创建的xxxController中view起始位置在导航栏上面
解决:
创建的xxxController去掉红色框中的钩
2.UIImagePickerController
UIImagePickerController *imagePickerController = [[UIImagePickerController alloc] init];
/*****....*****/
imagePickerController.navigationBar.translucent = NO;//将导航条的毛玻璃效果去除掉就可以了,解决上移问题
[self presentViewController:imagePickerController animated:YES completion:nil];
增加代码imagePickerController.navigationBar.translucent = NO;(将导航条的毛玻璃效果去除掉就可以了)