2013-07-18 2 views

답변

1

UITabBarItem의 이미지 위치를 바꿀 방법이없는 것처럼 보입니다. 난 그냥 버튼을 약 15 픽셀이 내 선택한 이미지를 수정하고 한 tabBar 15에 UITabBarItem 제목의 위치를 ​​수정 : didSelectItem : 내 사용자 지정의 방법 UITabBarController가 :

- (void)tabBar:(UITabBar *)tabBar didSelectItem:(UITabBarItem *)item 
{ 
    // If there is another selected item set default properties to it. 
    for (int counter = 0; counter < [self.tabBar.items count]; counter++) { 
     UITabBarItem *currentSelectedItem = [self.tabBar.items objectAtIndex:counter]; 
     [currentSelectedItem setTitlePositionAdjustment:UIOffsetMake(0, 0)]; 
    } 

    // Set selected item. 
    UITabBarItem *selectedItem = item; 
    [selectedItem setTitlePositionAdjustment:UIOffsetMake(0, -15)]; 
}