[英]UITableView Scrolling Horizontal issue
this is my code for creating tableView : 这是我创建tableView的代码:
_tableView = [[UITableView alloc] initWithFrame:CGRectMake(8, 0, self.view.frame.size.width - 16, self.view.frame.size.height - 8) style:UITableViewStylePlain];
[_tableView registerNib:[UINib nibWithNibName:@"commentCell" bundle:nil] forCellReuseIdentifier:@"commentCell"];
_tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
_tableView.backgroundColor = [UIColor groupTableViewBackgroundColor];
_tableView.dataSource = self;
_tableView.delegate = self;
[self.view addSubview:_tableView];
the Problem is that my table is scrolling horizontally I need to know how to deactivate it, I've tried bounce = NO; 问题是我的桌子在水平滚动,我需要知道如何禁用它,我尝试了bounce = NO; or contentSize but always same issue my table still allow scrolling horizontally 或contentSize,但始终是同一问题,我的表格仍允许水平滚动
问题是由我的viewDidAppear中的[tableView reaload]函数引起的,该函数在完成显示allCell之前重新加载了我的表,因此导致了不适当的行为
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.