UIApplication.ApplicationIconBadgeNumber 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
要顯示為應用程式徽章號碼的數值。
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.TvOS, 10, 0, ObjCRuntime.PlatformArchitecture.All, null)]
public virtual nint ApplicationIconBadgeNumber { [Foundation.Export("applicationIconBadgeNumber")] [ObjCRuntime.Introduced(ObjCRuntime.PlatformName.TvOS, 10, 0, ObjCRuntime.PlatformArchitecture.All, null)] get; [Foundation.Export("setApplicationIconBadgeNumber:")] [ObjCRuntime.Introduced(ObjCRuntime.PlatformName.TvOS, 10, 0, ObjCRuntime.PlatformArchitecture.All, null)] set; }
member this.ApplicationIconBadgeNumber : nint with get, set
屬性值
System.System.IntPtr
System.nativeint
- 屬性
備註
當此值為零時,不會顯示任何徽章。 當此值與零不同時,作業系統會將此值顯示為應用程式圖示上的徽章。
從 iOS 8.0 開始,您的應用程式必須註冊使用者通知,才能設定應用程式圖示徽章號碼。 您可以藉由呼叫 RegisterUserNotificationSettings(UIUserNotificationSettings) 來執行此動作。