是否可以在另一个类中覆盖DidEnterBackground?

时间:2019-08-21 02:51:21

标签: xamarin xamarin.forms xamarin.ios appdelegate

我试图创建一个可重用的有组织的类来覆盖IOS中的AppDelegate类。无论如何,有没有创建可以覆盖AppDelegate的DidEnterBackground方法的类?

我尝试创建一个类并继承global :: Xamarin.Forms.Platform.iOS.FormsApplicationDelegate并重写DidEnterBackground方法,但是它不起作用。


 public class Testing : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate
    {
   public override void DidEnterBackground(UIApplication application)
     {
            Console.WriteLine("App entering background state.");

        }

0 个答案:

没有答案
相关问题