I'm using a NavigationController and I want its UINavigationBar's GetPositionForBar() method to always return UIBarPosition.TopAttached
. As I'm using UINavigationController it's not possible to change the NavigationBar delegate, so I'm not sure how to proceed.
I tried a lot of things, one o them was:
public class CustomNavigationController : UINavigationController, IUINavigationBarDelegate
{
[Export ("positionForBar:")]
public UIBarPosition GetPositionForBar(IUIBarPositioning barPositioning)
{
return UIBarPosition.TopAttached;
}
}
But it's not working. How can I do this? I'm using Xamarin/Monotouch.