Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
MonoTouch Accessability helper
using System;
using MonoTouch.UIKit;
using MonoTouch.Foundation;
namespace BigTed.Utilities
{
public static class AccessabilityExtensions
{
/// <summary>
/// Description A succinct label that identifies the accessibility element, in a localized string.
/// </summary>
public static void SetAccessabilityLabel(this UIResponder control, string text)
{
control.SetValueForKey(new NSString(text), new NSString("accessibilityLabel"));
}
/// <summary>
/// A brief description of the result of performing an action on the accessibility element, in a localized string
/// </summary>
public static void SetAccessabilityHint(this UIResponder control, string text)
{
control.SetValueForKey(new NSString(text), new NSString("accessibilityHint"));
}
/// <summary>
/// Disables the accessibility. Handy for hiding controls you dont want to show
/// </summary>
public static void DisableAccessibility(this UIResponder control)
{
control.SetValueForKey(NSNumber.FromBoolean(false), new NSString("isAccessibilityElement"));
}
/// Disables the accessibility. Handy for hiding controls you dont want to show
/// </summary>
public static void EnableAccessibility(this UIResponder control)
{
control.SetValueForKey(NSNumber.FromBoolean(true), new NSString("isAccessibilityElement"));
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.