ios11 automaticallyAdjustsScroll

2017-09-27  本文已影响0人  牛1688

所有tableViewController 继承这个基类.把处理代码写在基类

#import "BaseTabVc.h"

@interface BaseTabVc ()

@end

@implementation BaseTabVc

- (void)viewDidLoad {

[super viewDidLoad];

[self seting];

}

-(void)seting{

//    self.automaticallyAdjustsScrollViewInsets = NO;

BOOL isRealize = [self.tableView respondsToSelector:@selector(contentInsetAdjustmentBehavior)];

if (isRealize) {

self.tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;

}else{

self.automaticallyAdjustsScrollViewInsets = NO;

}

}

上一篇 下一篇

猜你喜欢

热点阅读