automaticallyAdjustsScrollViewInsets屬性已經不再使用,我們需要使用UIScrollView的
contentInsetAdjustmentBehavior
屬性來替代它.
設定适當的枚舉:
if(@available(iOS11.0,*)){
self.tableView.contentInsetAdjustmentBehavior=UIScrollViewContentInsetAdjustmentNever;
}
else{
self.automaticallyAdjustsScrollViewInsets=NO;
}
NSLocationAlwaysAndWhenInUseUsageDeion
在iOS11,原有的NSLocationAlwaysUsageDeion被降級為NSLocationWhenInUseUsageDeion。是以,在原來項目中使用requestAlwaysAuthorization擷取定位權限,而未在plist檔案中配置NSLocationAlwaysAndWhenInUseUsageDeion,系統框不會彈出。
君凱商聯網-iOS-字唐名僧