Chlebta
Chlebta

Reputation: 3110

UITableView Scrolling Horizontal issue

this is my code for creating 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; or contentSize but always same issue my table still allow scrolling horizontally enter image description here

Upvotes: 1

Views: 107

Answers (1)

Chlebta
Chlebta

Reputation: 3110

The Issue was caused by [tableView reaload] function in my viewDidAppear , which reload my table before finishing displaying allCell so this caused inappropriate behaviour

Upvotes: 1

Related Questions