Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
I created a derived navigation controller with a xib file. Use the designer to create a button on the navigation bar and followed the steps to link the control to a variable. Run the application and button is null in C#.
Created attachment 4477 [details]
So the problem here is that in the Xib there's no relation between the navigation controller and the view controller.
It might be possible to have both the navigation controller and the view controller inside the same xib but honestly but that's a. not recommended by Apple, b. not how xibs should be used (more of a single view/controller type of thing).
All the examples you will find that use Xibs and navigation controllers will have a NavigationController set in code:
In your AppDelegate you'd do this:
// Initialize the UINavigationController with a custom ViewController directly
// (that's the missing link that your Xib is not doing, hence why you can't see the button item)
var navigationController = new UINavigationController (new MyViewController ());
window.RootViewController = navigationController;
However in general, especially since it's now 2017, I'd recommend using storyboard for navigation controller (;
In storyboards it's totally fine to have multiple view controllers and segues are the way to link one to another.
Also the Master-Detail default iOS template is a good start.
You might also be able to get more informations in our forums: https://forums.xamarin.com/categories/ios
This is not a bug with Xamarin.iOS though so I'm closing it.