[英]How to navigate on specific page in Xamarin Forms iOS?
I am using Xamarin Forms
and working with ANH
notification. 我正在使用
Xamarin Forms
并正在使用ANH
通知。 I am able to receive Notification from ANH. 我可以从ANH收到通知。 But the problem is when I am receiving notification and try to open it from notification area I want to redirect on a specific page of notification in iOS.
但是问题是当我收到通知并尝试从通知区域打开时,我想在iOS的通知的特定页面上进行重定向。 I have used
PendingIntent
on Android, But for iOS I have no idea. 我在Android上使用了
PendingIntent
,但对于iOS我不知道。
Also, I want to display a badge on the tab when an app is open and received notification. 另外,我想在应用打开并收到通知时在选项卡上显示徽章。 I am using
CustomRenderer
for iOS. 我正在使用iOS的
CustomRenderer
。 My code is for TabRenderer is : 我的TabRenderer代码是:
public class BottomTabbedPage : TabbedRenderer
{
public override void ViewWillAppear(bool animated)
{
base.ViewWillAppear(animated);
TabBar.UnselectedItemTintColor = UIColor.FromRGB(208,208,208);
TabBar.BackgroundColor = UIColor.White;
TabBar.Items[1].BadgeValue = SettingClass.MenuNotificationCount == 0 ? null : SettingClass.MenuNotificationCount.ToString();
TabBar.Items[2].BadgeValue = SettingClass.PromoNotificationCount == 0 ? null : SettingClass.PromoNotificationCount.ToString();
}
}
While App is starting badges will be displayed but when App is in background and notification is received count is increased but when the app is started badges are not updating. 当App启动时,将显示徽章,但是当App在后台运行且收到通知时,计数会增加,但在App启动时,徽章不会更新。 How can I solve this?
我该如何解决?
await App.Current.MainPage.Navigation.PushAsync(new specificPage()); 等待App.Current.MainPage.Navigation.PushAsync(new specificPage());
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.