Question

Open a viewController in landscape after rotating a screen, the UITableView horizontally scrolled how to disable UITableView horizontal scroll? I also tried using the following code

self.tableView.contentSize = CGSizeMake(self.tableView.frame.size.width, self.tableView.contentSize.height);
Was it helpful?

Solution

same code paste in

-(void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation    
    {            
 self.tableViewProductChild.contentSize = CGSizeMake(self.tableViewProductChild.frame.size.width, self.tableViewProductChild.contentSize.height);
 }

Its now worked thank you for your help

OTHER TIPS

In interface builder->Utilites->Scroll view section you can disable "Shows Horizontal Scrollers" option, or in code

self.tableView.showsHorizontalScrollIndicator = NO;

Try this:

self.tableView.contentSize = CGSizeMake(self.tableView.frame.size.width, self.tableView.contentSize.height);
[self.tableView reloadData];
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top