• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #region Copyright notice and license
2 
3 // Copyright 2018 The gRPC Authors
4 //
5 // Licensed under the Apache License, Version 2.0 (the "License");
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 //     http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 
17 #endregion
18 
19 using Foundation;
20 using UIKit;
21 
22 namespace HelloworldXamarin.iOS
23 {
24     // The UIApplicationDelegate for the application. This class is responsible for launching the
25     // User Interface of the application, as well as listening (and optionally responding) to application events from iOS.
26     [Register("AppDelegate")]
27     public class AppDelegate : UIApplicationDelegate
28     {
29         // class-level declarations
30 
31         public override UIWindow Window
32         {
33             get;
34             set;
35         }
36 
FinishedLaunching(UIApplication application, NSDictionary launchOptions)37         public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
38         {
39             // Override point for customization after application launch.
40             // If not required for your application you can safely delete this method
41 
42             return true;
43         }
44 
OnResignActivation(UIApplication application)45         public override void OnResignActivation(UIApplication application)
46         {
47             // Invoked when the application is about to move from active to inactive state.
48             // This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message)
49             // or when the user quits the application and it begins the transition to the background state.
50             // Games should use this method to pause the game.
51         }
52 
DidEnterBackground(UIApplication application)53         public override void DidEnterBackground(UIApplication application)
54         {
55             // Use this method to release shared resources, save user data, invalidate timers and store the application state.
56             // If your application supports background exection this method is called instead of WillTerminate when the user quits.
57         }
58 
WillEnterForeground(UIApplication application)59         public override void WillEnterForeground(UIApplication application)
60         {
61             // Called as part of the transiton from background to active state.
62             // Here you can undo many of the changes made on entering the background.
63         }
64 
OnActivated(UIApplication application)65         public override void OnActivated(UIApplication application)
66         {
67             // Restart any tasks that were paused (or not yet started) while the application was inactive.
68             // If the application was previously in the background, optionally refresh the user interface.
69         }
70 
WillTerminate(UIApplication application)71         public override void WillTerminate(UIApplication application)
72         {
73             // Called when the application is about to terminate. Save data, if needed. See also DidEnterBackground.
74         }
75     }
76 }
77 
78