Reputation: 7014
How can I hide the "title" text in the tabs in a TabGroup in an Appcelerator app for iOS?
By default, if I just leave the title attribute blank, it leaves extra space where the title would usually appear.
How it appears with "title" text:
How it appears without "title" text:
How I want it to appear:
Upvotes: 0
Views: 630
Reputation: 7014
This fix works, though it is a little hackish:
Go to /Users/[yourname]/Library/Application Support/Titanium/mobilesdk/osx/4.1.0.GA/iphone/Classes/
Open the file "TiUITabProxy.m" in Appcelerator Studio and make the following updates.
In TiUITabProxy.m search for "(void)updateTabBarItem" and insert this line:
[ourItem setImageInsets:UIEdgeInsetsMake(6, 0, -6, 0)];
right before the following line at the very end of the function:
[rootController setTabBarItem:ourItem];
Clean your project and rebuild.
There is an opened JIRA ticket for this to add this to Titanium proper: https://jira.appcelerator.org/browse/TIMOB-18515
The solution was originally provided in the Appcelerator Community forums at https://community.appcelerator.com/topic/2878/remove-tabgroup-tab-title-and-show-only-icon-on-ios/7
Upvotes: 2