static int NotificationEnumToInt(UIAccessibilityPostNotification notification) { switch (notification) { case UIKit.UIAccessibilityPostNotification.Announcement: return(UIView.AnnouncementNotification); case UIKit.UIAccessibilityPostNotification.LayoutChanged: return(UIView.LayoutChangedNotification); case UIKit.UIAccessibilityPostNotification.PageScrolled: return(UIView.PageScrolledNotification); case UIKit.UIAccessibilityPostNotification.ScreenChanged: return(UIView.ScreenChangedNotification); default: throw new ArgumentOutOfRangeException(string.Format("Unknown UIAccessibilityPostNotification: {0}", notification.ToString())); } }
static int NotificationEnumToInt(UIAccessibilityPostNotification notification) { switch (notification) { case XamCore.UIKit.UIAccessibilityPostNotification.Announcement: return UIView.AnnouncementNotification; case XamCore.UIKit.UIAccessibilityPostNotification.LayoutChanged: return UIView.LayoutChangedNotification; case XamCore.UIKit.UIAccessibilityPostNotification.PageScrolled: return UIView.PageScrolledNotification; case XamCore.UIKit.UIAccessibilityPostNotification.ScreenChanged: return UIView.ScreenChangedNotification; default: throw new ArgumentOutOfRangeException (string.Format ("Unknown UIAccessibilityPostNotification: {0}", notification.ToString ())); } }
// typedef uint32_t UIAccessibilityNotifications public static void PostNotification(UIAccessibilityPostNotification notification, NSObject argument) { PostNotification (NotificationEnumToInt (notification), argument); }
// typedef uint32_t UIAccessibilityNotifications public static void PostNotification(UIAccessibilityPostNotification notification, NSObject argument) { PostNotification(NotificationEnumToInt(notification), argument); }