【问题标题】:How to call Appdelegate function in PCL class using xamarin forms?如何使用 xamarin 表单在 PCL 类中调用 Appdelegate 函数?
【发布时间】:2018-09-19 14:40:03
【问题描述】:

在我的 Xamarin Studio for MAC 中,我使用“Xamarin.Forms”解决方案。我想在我的 PCL 类中使用 AppDelegate 函数。但我不明白怎么打电话。

【问题讨论】:

    标签: ios xamarin.forms appdelegate portable-class-library


    【解决方案1】:

    你不能在 pcl 中做到这一点。 有两种变体如何做到这一点。

    制作抽象 lvl,在 pcl 创建接口和在 ios 项目中实现它。

    第二个变体是使用 MessageCenter。

    【讨论】:

    • 谢谢,@Dmitry Zinoviev
    猜你喜欢
    • 1970-01-01
    • 2017-04-08
    • 2018-02-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-11-28
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多