简体   繁体   中英

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 suggest me why my tab bar items font change when I resume it's frame to previous one.

Use bellow code for hiding the Tab bar.

-(BOOL)hidesBottomBarWhenPushed
 {
  return YES;
 }

Then your problem is solve.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM