Skip to content

Instantly share code, notes, and snippets.

@wszdwp
Created December 6, 2018 17:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wszdwp/904856b38f15689bc7045c925122bf19 to your computer and use it in GitHub Desktop.
Save wszdwp/904856b38f15689bc7045c925122bf19 to your computer and use it in GitHub Desktop.
fix ios 11 table extra top margin in an existed project
if([[UIDevice currentDevice]userInterfaceIdiom]==UIUserInterfaceIdiomPad){
if (@available(iOS 11, *)) {
self.accountTableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
}
else {
self.accountTableView.contentInset = UIEdgeInsetsMake(-64, 0, 0, 0);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment