iOS tabBar 图标文字在ipad上横向排列问题
作者:
fordG | 来源:发表于
2019-05-28 09:15 被阅读0次- (UITraitCollection *)traitCollection;
- (UITraitCollection *)traitCollection {
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) {
return [UITraitCollection traitCollectionWithHorizontalSizeClass: UIUserInterfaceSizeClassCompact];
}
return super.traitCollection;
}
- 看别的人说是ios11系统默认ipad横向排列了,可以用上面的方法来竖项排列, 使用category可以达到不用在源代码里面修改, 对于使用第三方有比较好的解决办法
本文标题:iOS tabBar 图标文字在ipad上横向排列问题
本文链接:https://www.haomeiwen.com/subject/ntxrtctx.html
网友评论