Created
October 18, 2011 06:41
-
-
Save timrisi/1294763 to your computer and use it in GitHub Desktop.
main.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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