Chandni
Chandni

Reputation: 690

UItabbar item font change when change the frame of tab bar

I am using below code for hiding my tab bar

[self.tabBarController.tabBar setFrame:CGRectMake(0, -50, 0, 0)];

Now when I come back again on that view and show the tab bar it's font change. for again showing tab bar I am using this code.

     [self.tabBarController.tabBar setFrame:CGRectMake(0,[UIScreen mainScreen].bounds.size.height-49, self.view.frame.size.width, 49)];

Please have a look on screen shot

!the red circle font is a bug I am not setting font in my code or in storyboard. ]1

Please check it

screen shot of my storyboard

please suggest me why my tab bar items font change when I resume it's frame to previous one.

Upvotes: 0

Views: 480

Answers (1)

Siva Sankar
Siva Sankar

Reputation: 543

Use bellow code for hiding the Tab bar.

-(BOOL)hidesBottomBarWhenPushed
 {
  return YES;
 }

Then your problem is solve.

Upvotes: 2

Related Questions