[英]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)]; [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
] 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. 那您的问题就解决了。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.