美文网首页
ios11 automaticallyAdjustsScroll

ios11 automaticallyAdjustsScroll

作者: 牛1688 | 来源:发表于2017-09-27 11:52 被阅读0次

所有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;

}

}

相关文章

网友评论

      本文标题:ios11 automaticallyAdjustsScroll

      本文链接:https://www.haomeiwen.com/subject/yrxuextx.html