Skip to content

Instantly share code, notes, and snippets.

@thengineer
Created April 3, 2016 17:40
Show Gist options
  • Save thengineer/da16a0f6c25e533ba2d9d13c75bbc1ed to your computer and use it in GitHub Desktop.
Save thengineer/da16a0f6c25e533ba2d9d13c75bbc1ed to your computer and use it in GitHub Desktop.
using System;
using System.Collections.Generic;
using System.Linq;
using Foundation;
using UIKit;
using XLabs.Ioc;
using XLabs.Platform.Device;
using XLabs.Forms;
namespace DemoApp.iOS
{
[Register ("AppDelegate")]
public partial class AppDelegate : XLabs.Forms.XFormsApplicationDelegate
{
public override bool FinishedLaunching (UIApplication app, NSDictionary options)
{
global::Xamarin.Forms.Forms.Init ();
LoadApplication (new App ());
if (!Resolver.IsSet)
{
var container = new SimpleContainer();
container.Register<IAccelerometer, Accelerometer>();
Resolver.SetResolver(container.GetResolver());
}
return base.FinishedLaunching (app, options);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment