Monday, June 10, 2013

UITabBarItem setTitlePositionAdjustment example in Objective C (iOS).


UITabBarItem setTitlePositionAdjustment

Sets the offset to use to adjust the title position.

- (void)setTitlePositionAdjustment:(UIOffset)adjustment

Parameters of [UITabBarItem setTitlePositionAdjustment]
adjustment
The offset to use to adjust the title position.

UITabBarItem setTitlePositionAdjustment example.
verticalOffset = UIOffset.new(0, -4)

self.tabBarItem = UITabBarItem.alloc.initWithTitle('First', image: nil, tag: 0)
self.tabBarItem.setFinishedSelectedImage(tabSelected, withFinishedUnselectedImage: tabNormal)
self.tabBarItem.setTitlePositionAdjustment(verticalOffset)

Example of [UITabBarItem setTitlePositionAdjustment].
[tab.tabBarItem setTitlePositionAdjustment:UIOffsetMake(0, -10)]


UITabBarItem setTitlePositionAdjustment example.
Got it!

[tab.tabBarItem setTitlePositionAdjustment:UIOffsetMake(0, -10)]


End of UITabBarItem setTitlePositionAdjustment example article.