I have created a ContainerView in Xamarin, which automatically created a new ViewController.
I have created the class for this called Test1ViewController:
using System;
using MonoTouch.Foundation;
using MonoTouch.UIKit;
namespace test1
{
public partial class Test2ViewController : UIViewController
{
public Test2ViewController (IntPtr handle) : base (handle)
{
}
}
}
I am trying to reference this view controller in the ViewDidLoad() method of the main view controller. However if I put the following:
Test2ViewController.PresentViewController(picker, true, null);
I get a static error message, which makes sense as I am trying to reference the class not the specific object. Am I missing something, how do I reference the UIViewController in the ContainerView from the parent UIViewController?
What I am trying to achieve, is including the Scandit Barcode scanner within the container view:
// Setup the barcode scanner
var picker = new ScanditSDK.SIBarcodePicker ("API-KEY");
picker.OverlayController.Delegate = new BarcodeScanner ();
Test2ViewController.PresentViewController(picker, true, null);
picker.StartScanning ();