In iOS8, you can assign an accessibility label directly to a tab bar item:
_Controller.tabBarItem = [[UITabBarItem alloc] initWithTitle:nil image:nil tag:0]; _Controller.tabBarItem.accessibilityLabel = @"Foo";
For iOS7 and below, you are correct that you need to do something to hide the text. You can force it to be disabled, as shown in the figure:
_Controller.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"Foo" image:nil tag:0]; _Controller.tabBarItem.titlePositionAdjustment = UIOffsetMake(0, 200);
Or you can make the text color understandable:
_Controller.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"Foo" image:nil tag:0]; [_Controller.tabBarItem setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor clearColor]} forState:UIControlStateNormal];
Remember that any solution that you come will be used by visually impaired users to navigate your application. Since your background button is unfit for decoration, you should mark it as such:
button.isAccessibilityElement = NO; button.userInteractionEnabled = NO;
source share