Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UITableView overlaps status bar on iOS7 beta 4

Here is a UITableView that worked fine in iOS6 overlapping the status bar in iOS7. What is the best way to solve this problem? Using iOS7 beta 4. This behavior existed since beta 1.

META: Complain about me disobeying NDA to Apple directly at 800-275-2273 or Stack Overflow at 212-232-8294; or help me solve this problem here which is clearly superior to Apple's forums.

enter image description here

like image 677
William Entriken Avatar asked Aug 05 '13 06:08

William Entriken


3 Answers

If you're happy to have the "Language" section title to not overlap but don't mind the content overlapping once you scroll past it you can try this in your ViewController's viewDidLoad:

[self.tableView setContentInset:UIEdgeInsetsMake(20, 
                                       self.tableView.contentInset.left, 
                                       self.tableView.contentInset.bottom, 
                                       self.tableView.contentInset.right)];
like image 67
Nick Triantafillou Avatar answered Nov 19 '22 03:11

Nick Triantafillou


One answer is described here https://devforums.apple.com/message/830042#830042 (yes, you need to be a paid developer to access it). All answers are various levels of hackery. Given how bad this situation is, there will probably be a different solution in the final version.

As per the rant thread (https://devforums.apple.com/thread/197429?tstart=0 "We all are royally screwed!!!") I do really think Apple should be using its own resources for beta testing rather than leaning on its vendors. In a FOSS project we would call this a community, but Apple is closed so we are vendors.

like image 27
William Entriken Avatar answered Nov 19 '22 02:11

William Entriken


Starting with iOS 7, this is the expected behavior for a UITableView that's managed by a UITableViewController which is not inside a UINavigationController.

like image 2
Greg M. Krsak Avatar answered Nov 19 '22 02:11

Greg M. Krsak