New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
scroll bounds 异常 #54
Comments
是被遮挡还是什么,origin=0,-45 有问题? |
本地测试没有重现 - (void)viewDidLoad {
[super viewDidLoad];
if (@available(iOS 11, *)) {
self.scrollView.contentInsetAdjustmentBehavior = UIApplicationBackgroundFetchIntervalNever;
} else {
self.automaticallyAdjustsScrollViewInsets = false;
}
[self.navigationController.navigationBar setBackgroundImage:[UIImage new] forBarMetrics:(UIBarMetricsDefault)];
[self.view addSubview:self.scrollView];
self.scrollView.backgroundColor = [UIColor whiteColor];
self.scrollView.frame = CGRectMake(0, 0, self.view.bounds.size.width, self.view.bounds.size.height);
self.scrollView.contentSize = CGSizeMake(self.view.bounds.size.width, self.view.bounds.size.height*1.5);
UIView *contentView = [UIView new];
contentView.frame = CGRectMake(0, 0, self.view.bounds.size.width, self.view.bounds.size.height*1.5);
contentView.backgroundColor = [UIColor blueColor];
[self.scrollView addSubview:contentView];
KafkaRefreshHandler headBlock = ^(void){
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[self.scrollView.headRefreshControl endRefreshing];
});
};
[self.scrollView bindHeadRefreshHandler:headBlock themeColor:[UIColor redColor] refreshStyle:_style];
}
- (UIScrollView *)scrollView {
if (!_scrollView) {
_scrollView = [UIScrollView new];
}
return _scrollView;
}
|
可能是在数据绑定的时候产生了什么影响, 导致headrefresh暴露出来了,将原本的view给顶下来,从而产生了空白。 |
安好! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
提交bug前:
提交bug必须包含下列要点:
uiscrollview 顶部贴着屏幕, 添加headerControl ,顶部会被占用45 的高度,contentview的frame通过reveal查看 x y 均为 0,headerControl 的frame为 0,-45,375,45。 代码如上。 可判断这个空白不是 scroll 自动调整高度的64
The text was updated successfully, but these errors were encountered: