0
爲什麼行 「UIApplication.SharedApplication.ApplicationIconBadgeNumber = 0;」不行? 我發送推送通知了PHP。ApplicationIconBadgeNumber設置0不起作用
數量將通過百達的應用程序圖標顯示出來!
[Register ("AppDelegate")]
public partial class AppDelegate : UIApplicationDelegate
{
// class-level declarations
UIWindow window;
HomeViewController viewController;
//
// This method is invoked when the application has loaded and is ready to run. In this
// method you should instantiate the window, load the UI into it and then make the window
// visible.
//
// You have 17 seconds to return from this method, or iOS will terminate your application.
//
public override bool FinishedLaunching (UIApplication app, NSDictionary options)
{
UIApplication.SharedApplication.ApplicationIconBadgeNumber = 0;
window = new CustomWindow (UIScreen.MainScreen.Bounds);
viewController = new HomeViewController();
window.RootViewController = viewController;
window.MakeKeyAndVisible();
UIRemoteNotificationType notificationTypes = UIRemoteNotificationType.Alert | UIRemoteNotificationType.Badge;
UIApplication.SharedApplication.RegisterForRemoteNotificationTypes(notificationTypes);
return true;
}
不錯,但1始終由應用程序圖標所示,如果我UND啓動應用程序關閉它,1不會消失 – user3140252
隱藏徽章,你應該設定爲0 – ChikabuZ