【发布时间】:2016-05-10 20:43:37
【问题描述】:
在 UITabBarItem 中使用某些自定义字体时,我看到一些字符在底部被剪裁。我也在 UIButton 上看到了这种情况,但找到了一个解决方法,即继承 UIButton 并覆盖以下方法:
custom font on UIbutton title clipped on top of word
-(void)layoutSubviews
{
[super layoutSubviews];
CGRect frame = self.titleLabel.frame;
frame.size.height = self.bounds.size.height;
frame.origin.y = self.titleEdgeInsets.top;
self.titleLabel.frame = frame;
}
很遗憾,layoutSubviews 无法覆盖 UITabBarItem。有没有人遇到过这个问题并找到了解决方法?
【问题讨论】:
标签: ios objective-c uitabbaritem