I create a UITableViewController in code and push it over the navigation stack. This table view is intended to simply show a simple list of text elements.
I need to add some content Change to the table view that I add in the init method of my UITableViewController
self.tableView.contentInset = UIEdgeInsetsMake(7.0f, 5.0f, 7.0f, 5.0f);
However, when I load the table view, it seems that the left and right ContentInset actually stretched the width of my table view by 10. Now I see a small horizontal scrollable area. I don't need horizontal scrolling on my desk. If I delete the ContentInset code, my table view behaves explicitly, that is, it just provides vertical scrolling. How can I keep it this way, but with my content? I tried to reduce the value of contentSize.width by 10 in viewWillAppear, this did not affect.
This seems like a duplicate, but without an acceptable answer: UITableView ContentInsets scrolls the content horizontally
In the layout, I marked the desired ContentInset with a dashed line ---

Thanks.
ios iphone uitableview uiscrollview
George burdell
source share