Skip to content

Instantly share code, notes, and snippets.

@timrisi
Created October 18, 2011 06:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save timrisi/1294763 to your computer and use it in GitHub Desktop.
Save timrisi/1294763 to your computer and use it in GitHub Desktop.
main.cs
using System;
using System.Collections.Generic;
using System.Linq;
using MonoTouch.Foundation;
using MonoTouch.UIKit;
using Core;
namespace Hnefatafl
{
public class Application
{
static void Main (string[] args)
{
UIApplication.Main (args, null, "AppDelegate");
}
}
[Register("AppDelegate")]
public class AppDelegate : UIApplicationDelegate
{
private UIWindow window;
private UINavigationController navController;
// This method is invoked when the application has loaded its UI and its ready to run
public override bool FinishedLaunching (UIApplication app, NSDictionary options)
{
Settings.read();
window = new UIWindow(UIScreen.MainScreen.Bounds);
window.MakeKeyAndVisible ();
navController = new UINavigationController(new Menu());
window.AddSubview(navController.View);
return true;
}
// This method is required in iPhoneOS 3.0
public override void OnActivated (UIApplication application)
{
}
public override void WillTerminate(UIApplication application)
{
Settings.write();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment