相关文章推荐
侠义非凡的菠菜  ·  Python pandas ...·  4 天前    · 
侠义非凡的菠菜  ·  rc-form源码浅析 - ·  7 月前    · 
侠义非凡的菠菜  ·  Configuring HTTP ...·  10 月前    · 
聪明的作业本  ·  Advanced query ...·  32 分钟前    · 
失望的鸡蛋面  ·  "Microsoft Outlook ...·  34 分钟前    · 
坚强的柿子  ·  mongodb 多表关联处理 : ...·  37 分钟前    · 
不爱学习的火腿肠  ·  java ...·  2 小时前    · 
旅行中的铁链  ·  错误信息:SSL ShakeHand ...·  2 小时前    · 
憨厚的金鱼  ·  Scanpy数据结构:AnnData - 何帅 ·  2 小时前    · 
[Foundation.Advice("Use UIView.Notifications.ObserveSpeakSelectionStatusDidChange helper method instead.")]
[Foundation.Field("UIAccessibilitySpeakSelectionStatusDidChangeNotification", "UIKit")]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 8, 0, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Unavailable(ObjCRuntime.PlatformName.WatchOS, ObjCRuntime.PlatformArchitecture.All, null)]
public static Foundation.NSString SpeakSelectionStatusDidChangeNotification { [ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 8, 0, ObjCRuntime.PlatformArchitecture.All, null)] [ObjCRuntime.Unavailable(ObjCRuntime.PlatformName.WatchOS, ObjCRuntime.PlatformArchitecture.All, null)] get; }
member this.SpeakSelectionStatusDidChangeNotification : Foundation.NSString

這個常數可以與 搭配 NSNotificationCenter 使用,以註冊此通知的接聽程式。 這是 NSString 而不是字串,因為這些值可以當做某些原生程式庫中的標記使用,而不是單純用於其實際字串內容。 回呼的 'notification' 參數包含通知類型特有的額外資訊。

// Lambda style
NSNotificationCenter.DefaultCenter.AddObserver (
        UIView.SpeakSelectionStatusDidChangeNotification, (notification) => {Console.WriteLine ("Received the notification UIView", notification); }
// Method style
void Callback (NSNotification notification)
    Console.WriteLine ("Received a notification UIView", notification);
void Setup ()
    NSNotificationCenter.DefaultCenter.AddObserver (UIView.SpeakSelectionStatusDidChangeNotification, Callback);
 
推荐文章