Created
November 10, 2013 06:58
-
-
Save saiday/7394795 to your computer and use it in GitHub Desktop.
UITabBarController disable Title, Image align center
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.h | |
@interface TabViewController : UITabBarController | |
.m | |
- (id)initWithCoder:(NSCoder *)aDecoder | |
{ | |
self = [super initWithCoder:aDecoder]; | |
if (self) { | |
NSInteger offset = 7; | |
UIEdgeInsets imageInset = UIEdgeInsetsMake(offset, 0, -offset, 0); | |
for (UITabBarItem *item in self.tabBar.items) { | |
item.imageInsets = imageInset; | |
} | |
} | |
return self; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment