I have set
NavigationController.NavigationBar.Translucent = true;
Then add table and set frame to RootView Frame, and:
public override void ViewDidLayoutSubviews()
{
base.ViewDidLayoutSubviews();
float y = this.TopLayoutGuide.Length;
table.ContentInset = new UIEdgeInsets (y, 0, 0, 0);
}
But, I Have table Scroll Bar under NavigationBar (I use monotouch):
I solved task with this simple code:
Most of the time, solutions that introduce a magic constant doesn't scale, for example if the next iPhone introduces a different navigation bar height we'll have to update our code.
Fortunately, Apple provided us cleaner ways of overcoming this issue, for example topLayoutGuide:
Programmatically you can achieve with the following code snippet (the same can be achieved via IB too):
Note: topLayoutGuide is deprecated in iOS 11, we should use the safeAreaLayoutGuide property of UIView instead.
Just put
navigationBar.translucent = NO;
you problem will solve :)Other option is,,
Put following code.
Another option is ..
Why does UIViewController extend under UINavigationBar, while UITableViewController doesn't?
Try this:
This worked for me