Last active
December 30, 2015 17:09
-
-
Save shallaa/7859127 to your computer and use it in GitHub Desktop.
App Lifecycle Methods
This file contains hidden or 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; | |
| namespace AppLifeCycleMethods | |
| { | |
| [Register ("AppDelegate")] | |
| public partial class AppDelegate : UIApplicationDelegate | |
| { | |
| UIWindow window; | |
| ViewLifeCycleMethods viewController; | |
| public override bool WillFinishLaunching (UIApplication application, NSDictionary launchOptions) | |
| { | |
| Console.WriteLine ("WillFinishLaunching"); | |
| return true; | |
| } | |
| public override bool FinishedLaunching (UIApplication app, NSDictionary options) | |
| { | |
| Console.WriteLine ("FinishedLaunching"); | |
| viewController = new ViewLifeCycleMethods (); | |
| window = new UIWindow (UIScreen.MainScreen.Bounds); | |
| window.RootViewController = viewController; | |
| window.MakeKeyAndVisible (); | |
| return true; | |
| } | |
| public override void OnActivated (UIApplication application) | |
| { | |
| Console.WriteLine ("OnActivated"); | |
| } | |
| public override void OnResignActivation (UIApplication application) | |
| { | |
| Console.WriteLine ("OnResignActivation"); | |
| } | |
| public override void DidEnterBackground (UIApplication application) | |
| { | |
| Console.WriteLine ("DidEnterBackground"); | |
| } | |
| public override void WillEnterForeground (UIApplication application) | |
| { | |
| Console.WriteLine ("WillEnterForeground"); | |
| } | |
| public override void WillTerminate (UIApplication application) | |
| { | |
| Console.WriteLine ("WillTerminate"); | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment