UITableView Interfering with Status Bar

I am working on an application that has a UITableViewController that displays a list of values ​​like this:

Screen shot

How can I move the table down so that it does not collide with my status bar? It seems that I can not apply any restrictions for this scene, so that I would be at a loss.

+8
ios uitableview swift statusbar
source share
3 answers

Use the following 3 properties on a UIViewController

 self.edgesForExtendedLayout=UIRectEdgeNone; self.extendedLayoutIncludesOpaqueBars=NO; self.automaticallyAdjustsScrollViewInsets=NO; 
+2
source share

Set the edgesForExtendedLayout for the ViewController to UIRectEdgeNone in your viewDidLoad() method. This will start the table view below the status bar.

 self.edgesForExtendedLayout = UIRectEdgeNone; 
+1
source share

Try this on iOS 9. In your view, the controller viewDidLoad () -

 self.yourTableViewReference.contentInset.top = 20 self.yourTableViewReference.scrollIndicatorInsets.top = 20 
0
source share

All Articles