Taking advantage of background multi-tasking in iOS 4

Your Program must inherit from MonoGameProgram and assign the new instance of your Game. See the example below....

       [Register ("AppDelegate")]
	class  Program : MonoGameProgram
		public override bool FinishedLaunching (UIApplication app, NSDictionary options)
			// Fun begins..
			MonoGameGame = new MyAwesomeGame(); 
			return true;
		static void Main (string [] args)
			UIApplication.Main (args,null,"AppDelegate");

Then the XNA Activated and Deactivated events will be called when DidEnterBackground and WillEnterForeground are called.

Last edited Jun 19, 2011 at 12:33 AM by CartBlanche, version 2


paulianharman Aug 17, 2013 at 1:14 PM 
Is this still the right thing to do? Only MonoGameProgram doesn't seem to exist any more...