iOS 7.1 issue - Tabbar icon image is automatically resize when touch and drag on that tab button iOS 7.1 issue - Tabbar icon image is automatically resize when touch and drag on that tab button ios ios

iOS 7.1 issue - Tabbar icon image is automatically resize when touch and drag on that tab button


This problem was resolved by setting the imageInsets of the tabBarItem as others have mentioned. You can do this in code or you can do it in Interface Builder, it doesn't matter.

The important point is to have the top inset BE EQUAL to the bottom inset.


I had the same problem on iOS 7.1 when trying to set the Image insets by code like:

[self.tabBarItem setImageInsets:UIEdgeInsetsMake(5, 0, -5, 0)];

So I solved it using directly the Bar Item Size on my Storyboard.

Bar Item Size menu

Take in count that for this to work you should be assigning the image of you TabBarItem in the following way

UITabBar *tabBar = self.tabBarController.tabBar;UITabBarItem *myItem = [tabBar.items objectAtIndex:0];[homeItem setFinishedSelectedImage:[UIImage imageNamed:@"A.png"]       withFinishedUnselectedImage:[UIImage imageNamed:@"B.png"]];

instead of this way

[self.tabBarItem setFinishedSelectedImage:[UIImage imageNamed:@"A.png"]              withFinishedUnselectedImage:[UIImage imageNamed:@"B.png"]];

Update

To access the Bar Item Size select directly the 'Item' element under the Scene of any of your Tab Bar Controller's child. (Image1)

enter image description here


my problem is similar, the tabbar icon changed it position in 7.1 update, this problem is really annoying, and I did a quick solution because I have to approve the app. Was this:

tab bar soluction in nib

Ok I not sure that is the best solution, but for me works.