1. 程式人生 > >iOS11 適配utomaticallyAdjustsScrollViewInsets

iOS11 適配utomaticallyAdjustsScrollViewInsets

self.view.backgroundColor = WWGlobalBg;

    if (WWSystemVersion < 11.0) {

self.automaticallyAdjustsScrollViewInsets = NO;

    }

    if (@available(iOS 11.0, *)) {

        [[UIScrollViewappearance] setContentInsetAdjustmentBehavior:UIScrollViewContentInsetAdjustmentNever];

    }