hi
I'm using the uitableview without interface builder and want to add voice
over commands to my labels
problem
I need to add voice over commands to each cell so that it is accessible. i
found this code but i have no idea when to call this fuction. Is there away
that I can add this functionality to each cell during data binding to the
uitableview?
this is the code that i need to use to add voice commands to my labels
public static class AccessibilityExtensions
{
static Selector selAccessibilityLabel = new
Selector("accessibilityLabel");
static Selector selSetAccessibilityLabel = new
Selector("setAccessibilityLabel:");
public static string GetAccessibilityLabel(this UIView obj)
{
if (obj == null)
throw new ArgumentNullException("obj");
if (obj.RespondsToSelector(selAccessibilityLabel))
return new
NSString(Messaging.IntPtr_objc_msgSend(obj.Handle,
selAccessibilityLabel.Handle));
else
return null;
}
public static void SetAccessibilityLabel(this UIView obj,
string text)
{
if (obj == null)
throw new ArgumentNullException("obj");
if (obj.RespondsToSelector(selSetAccessibilityLabel))
Messaging.void_objc_msgSend_intptr(obj.Handle,
selSetAccessibilityLabel.Handle,
new NSString(text).Handle);
}
}
http://pastebin.com/0bqJaP0B
--
View this message in context:
http://monotouch.2284126.n4.nabble.com/monotouch-uitableview-and-accessibility-tp4303857p4303857.html
Sent from the MonoTouch mailing list archive at Nabble.com.
_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch