UITabBarItem Title Text Not Align Centrally, When We Set Device in Landscape Mode in iOS13
I found the solution of this problem, you want to add one method into your viewController.m file which have a TabBar.
If your application supporting dark mode then you need to add this method, it will work for all iOS device
-(UITraitCollection *)traitCollection {
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
return [super traitCollection];
}else{
UITraitCollection *superSizeClass = [super traitCollection];
UITraitCollection *verticalSizeClass = [UITraitCollection traitCollectionWithVerticalSizeClass:UIUserInterfaceSizeClassRegular];
NSArray *combinedTraitArray = [NSArray arrayWithObjects: superSizeClass,verticalSizeClass, nil];
UITraitCollection *combinedTraits = [UITraitCollection traitCollectionWithTraitsFromCollections: combinedTraitArray];
return combinedTraits;
}
}
It will work for this issue. Thanks.
UITabBarItem icon not colored correctly for iOS 13 when a bar tint color is specified in Interface Builder in Xcode 11, beta 2
On the surface, this might seem like a bug, however you can mitigate it by defining an .unselectedItemTintColor on your UITabBar instance.
self.tabBar.unselectedItemTintColor = [UIColor lightGrayColor];
UITabBar transparent labels bug in iOS 13
Well, this is due to the behavior in the default dark mode on iOS 13.
To achieve what you wanted with labels as on iOS versions below 13,
Simply add this into your Info.plist:
<key>UIUserInterfaceStyle</key>
<string>Light</string>
What this essentially does is changing the global user interface style to the light style which is the default style on iOS versions below 13.
If you won't prefer to change the user interface style, you can also change the tint color of the unselected items on the tab bar:
tabBar.unselectedItemTintColor = .darkGray
or to any other tint color of your choice.
Related Topics
How to Make List with Single Selection with Swiftui
How Are Optional Values Implemented in Swift
How to Convert a Swift String to Cfstring
How to Use .Svg Images in Swiftui
Spritekit - Create at Random Position Without Overlapping
How to Remove Numbers from a String in Swift
How to Add Constraints Programmatically to My Uilabel
Swift Didset Get Index of Array
How to Update Swift from 3.1 to 3.2, But Not to 4.0
How to Cast an _Nsmallocblock_ to Its Underlying Type in Swift 3
Propertywrappers and Protocol Declaration
Swift: How to Access in Appdelegate Variable from the View Controller
Swift Error: Guard Body Must Not Fall Through
Open a Viewcontroller from Remote Notification
Spawning a Spritekit Node at a Random Time