*这个东西改完导航条会有问题
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface UITabBarController (TabButtonType)
//- (UITraitCollection *)traitCollection;
@end
NS_ASSUME_NONNULL_END
#import "UITabBarController+TabButtonType.h"
@implementation UITabBarController (TabButtonType)
- (UITraitCollection *)traitCollection {
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) {
return [UITraitCollection traitCollectionWithHorizontalSizeClass: UIUserInterfaceSizeClassCompact];
}
return super.traitCollection;
}
@end